Only works for tokens that support EIP-2612 permit (e.g., USDC)
Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set gas_sponsorship=false to receive an unsigned transaction that the owner must sign, submit, and pay gas for.
POST
/
v2
/
gas_sponsorship
/
approve_transfer
Python (SDK)
from compass_api_sdk import CompassAPI, modelswith CompassAPI( api_key_auth="<YOUR_API_KEY_HERE>",) as compass_api: res = compass_api.gas_sponsorship.gas_sponsorship_approve_transfer(owner="0x06A9aF046187895AcFc7258450B15397CAc67400", chain=models.Chain.BASE, token="USDT", gas_sponsorship=False) # Handle response print(res)
import { CompassApiSDK } from "@compass-labs/api-sdk";
const compassApiSDK = new CompassApiSDK({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await compassApiSDK.gasSponsorship.gasSponsorshipApproveTransfer({
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
chain: "base",
token: "USDT",
});
console.log(result);
}
run();
Optionally request gas sponsorship. If set to true, EIP-712 signature data will be returned that must be signed by the owner and submitted to the /gas_sponsorship/prepare endpoint.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Compass API Docs","colors":{"primary":"#0284c7","light":"#0e9fe9","dark":"#0284c7"},"logo":{"light":"https://mintcdn.com/compasslabs-f07467e0/x2NrFgZ7soJbH6sc/logo/light.svg?fit=max\u0026auto=format\u0026n=x2NrFgZ7soJbH6sc\u0026q=85\u0026s=80a04b06674000990914306c6a833cb9","dark":"https://mintcdn.com/compasslabs-f07467e0/x2NrFgZ7soJbH6sc/logo/dark.svg?fit=max\u0026auto=format\u0026n=x2NrFgZ7soJbH6sc\u0026q=85\u0026s=77e910ba12605c7f004ad72498f8076f"},"favicon":"https://mintcdn.com/compasslabs-f07467e0/x2NrFgZ7soJbH6sc/favicon.svg?fit=max\u0026auto=format\u0026n=x2NrFgZ7soJbH6sc\u0026q=85\u0026s=2025e9c84a2b6b167d319b28e1ecb8a0","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://calendly.com/elisabeth-compasslabs/30min","label":"Book a demo"},{"href":"https://compasslabs.ai/login","label":"Login"}]},"footer":{"socials":{"x":"https://x.com/labs_compass","github":"https://github.com/CompassLabs","linkedin":"https://www.linkedin.com/company/compass-labs-ai","medium":"https://medium.com/@compasslabs","telegram":"https://discord.com/invite/ujetyJJPYr","discord":"https://discord.com/invite/ujetyJJPYr"},"links":[{"header":"Resources","items":[{"label":"Blog","href":"https://medium.com/@compasslabs"}]},{"header":"Legal","items":[{"label":"Terms \u0026 Conditions","href":"https://docs.compasslabs.ai/v1/support/terms-and-conditions"},{"label":"Privacy Policy","href":"https://docs.compasslabs.ai/v1/support/privacy-policy"}]}]},"styling":{"eyebrows":"section","codeblocks":"system","latex":false},"integrations":{"ga4":{"measurementId":"G-EQSZ3TK15C"},"gtm":{"tagId":"GTM-5NXMZG6D"}},"contextual":{"options":["chatgpt","claude"],"display":"header"},"navigation":{"global":{"tabs":[],"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"compasslabs-f07467e0","hasAudioNarration":false,"actualSubdomain":"compasslabs-f07467e0","customDomains":["docs.compasslabs.ai"],"gitSource":{"type":"github","owner":"compasslabs","repo":"mono","deployBranch":"production","contentDirectory":"api_docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":true,"edits":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af1a85ec512f82174899a92","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":300},{"language":"default","tag":"Documentation","count":30},{"language":"default","tag":"Aave V3","count":15},{"language":"default","tag":"Credit","count":15},{"language":"default","tag":"Perpetual Trading","count":15},{"language":"default","tag":"Tokenized Assets","count":15},{"language":"default","tag":"Earn","count":13},{"language":"default","tag":"Morpho","count":12},{"language":"default","tag":"Uniswap V3","count":10},{"language":"default","tag":"Transaction Bundler","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"button.css","content":"@keyframes jump{0%,100%{transform:translateY(0)}50%{transform:translateY(-20px)}}.jump-loop{animation:jump 0.5s ease infinite}#code-group{background-color:#EFEFEF33;box-shadow:0 4px 12px rgba(0, 0, 0, 0.08)}#code-group:hover{box-shadow:0 6px 18px rgba(0, 0, 0, 0.1)}#content-area>div.flex.flex-col.gap-8>div.mt-6.flex.w-full.flex-col.space-y-4>div{background-color:#EFEFEF33}#content-area>div.flex.flex-col.gap-8>div.mt-6.flex.w-full.flex-col.space-y-4>div{box-shadow:0 4px 12px rgba(0, 0, 0, 0.08)}#content-area>div.flex.flex-col.gap-8>div.mt-6.flex.w-full.flex-col.space-y-4>div:hover{box-shadow:0 6px 18px rgba(0, 0, 0, 0.1)}"}],"page":{"pagePath":"v2/api-reference/gas-sponsorship/approve-token-transfer","slug":"/v2/api-reference/gas-sponsorship/approve-token-transfer","pageMetadata":{"title":"Approve token transfer","description":"Set up a one-time Permit2 allowance for gas-sponsored token transfers.\n\nRequired when using [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account) or [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account) with `gas_sponsorship=true`. This allowance only needs to be set up once per token.\n\n**With gas sponsorship (`gas_sponsorship=true`):**\n- Returns EIP-712 typed data for the owner to sign off-chain\n- Submit signature + typed data to [/prepare](https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction)\n- Only works for tokens that support EIP-2612 permit (e.g., USDC)\n\nSome tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set `gas_sponsorship=false` to receive an unsigned transaction that the owner must sign, submit, and pay gas for.","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/gas_sponsorship/approve_transfer","href":"/v2/api-reference/gas-sponsorship/approve-token-transfer","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Set up a one-time Permit2 allowance for gas-sponsored token transfers.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Required when using \", _jsx(_components.a, {\n href: \"https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account\",\n children: \"/earn/transfer\"\n }), \" or \", _jsx(_components.a, {\n href: \"https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account\",\n children: \"/credit/transfer\"\n }), \" with \", _jsx(_components.code, {\n children: \"gas_sponsorship=true\"\n }), \". This allowance only needs to be set up once per token.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsxs(_components.strong, {\n children: [\"With gas sponsorship (\", _jsx(_components.code, {\n children: \"gas_sponsorship=true\"\n }), \"):\"]\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Returns EIP-712 typed data for the owner to sign off-chain\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Submit signature + typed data to \", _jsx(_components.a, {\n href: \"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction\",\n children: \"/prepare\"\n })]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Only works for tokens that support EIP-2612 permit (e.g., USDC)\"\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set \", _jsx(_components.code, {\n children: \"gas_sponsorship=false\"\n }), \" to receive an unsigned transaction that the owner must sign, submit, and pay gas for.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Approve token transfer","description":"Set up a one-time Permit2 allowance for gas-sponsored token transfers.\n\nRequired when using [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account) or [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account) with `gas_sponsorship=true`. This allowance only needs to be set up once per token.\n\n**With gas sponsorship (`gas_sponsorship=true`):**\n- Returns EIP-712 typed data for the owner to sign off-chain\n- Submit signature + typed data to [/prepare](https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction)\n- Only works for tokens that support EIP-2612 permit (e.g., USDC)\n\nSome tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set `gas_sponsorship=false` to receive an unsigned transaction that the owner must sign, submit, and pay gas for.","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/gas_sponsorship/approve_transfer","href":"/v2/api-reference/gas-sponsorship/approve-token-transfer","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/compasslabs-f07467e0/27fd886bf35b6ed0/redeploy-trigger.js","/_mintlify/custom/compasslabs-f07467e0/5b350f94165e79a1/scripts/auth-btns.js","/_mintlify/custom/compasslabs-f07467e0/0c2ee6a003a69104/scripts/home-btn-link.js","/_mintlify/custom/compasslabs-f07467e0/17a3e2d25ff9b880/scripts/magic.js","/_mintlify/custom/compasslabs-f07467e0/2592024b81e4044f/scripts/modal.js","/_mintlify/custom/compasslabs-f07467e0/60b3db97b96f7d26/scripts/language-icon-fixer.js","/_mintlify/custom/compasslabs-f07467e0/60408501351ea2bb/scripts/disable-bundler-playground.js"],"openApiReferenceData":{"operation":{"tags":["Gas Sponsorship"],"summary":"Approve token transfer","description":"Set up a one-time Permit2 allowance for gas-sponsored token transfers.\n\nRequired when using [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account) or [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account) with `gas_sponsorship=true`. This allowance only needs to be set up once per token.\n\n**With gas sponsorship (`gas_sponsorship=true`):**\n- Returns EIP-712 typed data for the owner to sign off-chain\n- Submit signature + typed data to [/prepare](https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction)\n- Only works for tokens that support EIP-2612 permit (e.g., USDC)\n\nSome tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set `gas_sponsorship=false` to receive an unsigned transaction that the owner must sign, submit, and pay gas for.","operationId":"v2_gas_sponsorship_approve_transfer","requestBody":"d2d07af4-dcc7-4725-bb78-6428651d7e2a","responses":{"200":"8e05b32b-6f40-431f-8162-4d44eb01573a","422":"d70f8548-87a7-43a4-936c-37189ba7e7da"},"x-speakeasy-name-override":"gas_sponsorship_approve_transfer","x-codeSamples":[{"lang":"python","label":"Python (SDK)","source":"from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE>\",\n) as compass_api:\n\n res = compass_api.gas_sponsorship.gas_sponsorship_approve_transfer(owner=\"0x06A9aF046187895AcFc7258450B15397CAc67400\", chain=models.Chain.BASE, token=\"USDT\", gas_sponsorship=False)\n\n # Handle response\n print(res)"},{"lang":"typescript","label":"Typescript (SDK)","source":"import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.gasSponsorship.gasSponsorshipApproveTransfer({\n owner: \"0x06A9aF046187895AcFc7258450B15397CAc67400\",\n chain: \"base\",\n token: \"USDT\",\n });\n\n console.log(result);\n}\n\nrun();"}],"method":"post","type":"path","servers":["5cc70962-0013-441d-bd6f-5cb484ceb892"],"security":["e89f6d8c-9ae7-44f6-91ab-c06b98b98bae"],"path":"/v2/gas_sponsorship/approve_transfer","baseUrlOptions":["https://api.compasslabs.ai"],"title":"Approve token transfer","codeSamples":[{"label":"Python (SDK)","lang":"python","source":"from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE>\",\n) as compass_api:\n\n res = compass_api.gas_sponsorship.gas_sponsorship_approve_transfer(owner=\"0x06A9aF046187895AcFc7258450B15397CAc67400\", chain=models.Chain.BASE, token=\"USDT\", gas_sponsorship=False)\n\n # Handle response\n print(res)"},{"label":"Typescript (SDK)","lang":"typescript","source":"import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.gasSponsorship.gasSponsorshipApproveTransfer({\n owner: \"0x06A9aF046187895AcFc7258450B15397CAc67400\",\n chain: \"base\",\n token: \"USDT\",\n });\n\n console.log(result);\n}\n\nrun();"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"owner":{"type":"string","title":"Owner","description":"The wallet address that owns the Earn Account.","default":"0x06A9aF046187895AcFc7258450B15397CAc67400","examples":["0x06A9aF046187895AcFc7258450B15397CAc67400"],"isRequired":true,"uniqueKey":"owner","typeLabel":"string"},"chain":{"type":"string","enum":["base","ethereum","arbitrum","hyperevm","tempo","bsc","robinhood","ethereum_sepolia"],"title":"Chain","description":"Blockchain network","default":"base","examples":["base"],"isRequired":true,"uniqueKey":"chain","typeLabel":"enum\u003cstring>"},"token":{"type":"string","title":"Token","description":"The token you would like to transfer with gas sponsorship.","examples":["USDC","WETH","0xA0b86a33E6441ccF30EE5DdEF1E9b652C91ac1c8"],"default":"USDT","isRequired":true,"uniqueKey":"token","typeLabel":"string"},"gas_sponsorship":{"type":"boolean","title":"Gas Sponsorship","description":"Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint.","default":false,"uniqueKey":"gas_sponsorship","typeLabel":"boolean"}},"type":"object","required":["owner","chain","token"],"title":"ApproveTransferRequest","default":{"chain":"base","owner":"0x06A9aF046187895AcFc7258450B15397CAc67400","token":"USDT"},"uniqueKey":"","typeLabel":"ApproveTransferRequest · object"},"examples":{"Example":{"title":"Example","value":{"chain":"base","owner":"0x06A9aF046187895AcFc7258450B15397CAc67400","token":"USDT"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"8e05b32b-6f40-431f-8162-4d44eb01573a":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"transaction":{"oneOf":[{"type":"object","title":"UnsignedTransaction","description":"Unsigned approval transaction. Present when gas_sponsorship=false.","required":["chainId","data","from","gas","to","value","nonce","maxFeePerGas","maxPriorityFeePerGas"],"example":{"chainId":"0x2105","data":"0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000675f4a3d","from":"0x4A83b4413CF41C3244027e1590E35a0F48403F0c","gas":"0x7a120","maxFeePerGas":"0x59682f00","maxPriorityFeePerGas":"0x3b9aca00","nonce":"0x5","to":"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67","value":"0x0"},"properties":{"chainId":{"type":"string","title":"Chainid","description":"The chain id of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.chainId","typeLabel":"string"},"data":{"type":"string","title":"Data","description":"The data of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.data","typeLabel":"string"},"from":{"type":"string","title":"From","description":"The sender of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.from","typeLabel":"string"},"gas":{"oneOf":[{"type":"string","title":"Gas","description":"The gas of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.gas.oneOf.0","typeLabel":"string"},{"type":"null","title":"Gas","description":"The gas of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.gas.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transaction.oneOf.0.gas","typeLabel":"string | null"},"to":{"type":"string","title":"To","description":"The recipient of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.to","typeLabel":"string"},"value":{"type":"string","title":"Value","description":"The value of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.value","typeLabel":"string"},"nonce":{"type":"string","title":"Nonce","description":"The nonce of the address","isRequired":true,"uniqueKey":"transaction.oneOf.0.nonce","typeLabel":"string"},"maxFeePerGas":{"type":"string","title":"Maxfeepergas","description":"The max fee per gas of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.maxFeePerGas","typeLabel":"string"},"maxPriorityFeePerGas":{"type":"string","title":"Maxpriorityfeepergas","description":"The max priority fee per gas of the transaction","isRequired":true,"uniqueKey":"transaction.oneOf.0.maxPriorityFeePerGas","typeLabel":"string"}},"uniqueKey":"transaction.oneOf.0","typeLabel":"UnsignedTransaction · object"},{"type":"null","description":"Unsigned approval transaction. Present when gas_sponsorship=false.","uniqueKey":"transaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"transaction","typeLabel":"UnsignedTransaction · object | null"},"eip_712":{"oneOf":[{"type":"object","title":"PermitTypedDataResponse","description":"EIP-712 typed data for off-chain permit signing. Present when gas_sponsorship=true.","required":["domain","types","primaryType","message"],"example":{"domain":{"chainId":8453,"name":"USD Coin","verifyingContract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","version":"2"},"message":{"deadline":"1735689600","nonce":"0","owner":"0x4A83b4413CF41C3244027e1590E35a0F48403F0c","spender":"0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1","value":"100000000"},"primaryType":"Permit","types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Permit":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"nonce","type":"uint256"},{"name":"deadline","type":"uint256"}]}},"properties":{"domain":{"properties":{"name":{"type":"string","title":"Name","description":"Token name","isRequired":true,"uniqueKey":"eip_712.oneOf.0.domain.name","typeLabel":"string"},"version":{"type":"string","title":"Version","description":"Token version (usually '1' or '2')","isRequired":true,"uniqueKey":"eip_712.oneOf.0.domain.version","typeLabel":"string"},"chainId":{"type":"integer","title":"Chainid","description":"Chain ID","isRequired":true,"uniqueKey":"eip_712.oneOf.0.domain.chainId","typeLabel":"integer"},"verifyingContract":{"type":"string","title":"Verifyingcontract","description":"Token contract address","isRequired":true,"uniqueKey":"eip_712.oneOf.0.domain.verifyingContract","typeLabel":"string"}},"type":"object","required":["name","version","chainId","verifyingContract"],"title":"EIP712Domain","description":"EIP-712 domain separator","isRequired":true,"uniqueKey":"eip_712.oneOf.0.domain","typeLabel":"EIP712Domain · object"},"types":{"properties":{"EIP712Domain":{"items":{"properties":{"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types.EIP712Domain.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","title":"Type","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types.EIP712Domain.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["name","type"],"title":"EIP712DomainField","description":"A field in the EIP712Domain type definition.","uniqueKey":"eip_712.oneOf.0.types.EIP712Domain.items.[INDEX]","typeLabel":"EIP712DomainField · object"},"type":"array","title":"Eip712Domain","description":"EIP712Domain type definition","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types.EIP712Domain","typeLabel":"EIP712DomainField · object[]"},"Permit":{"items":{"properties":{"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types.Permit.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","title":"Type","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types.Permit.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["name","type"],"title":"PermitField","description":"A field in the Permit type definition.","uniqueKey":"eip_712.oneOf.0.types.Permit.items.[INDEX]","typeLabel":"PermitField · object"},"type":"array","title":"Permit","description":"Permit type definition","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types.Permit","typeLabel":"PermitField · object[]"}},"type":"object","required":["EIP712Domain","Permit"],"title":"EIP712Types","description":"EIP-712 type definitions","isRequired":true,"uniqueKey":"eip_712.oneOf.0.types","typeLabel":"EIP712Types · object"},"primaryType":{"type":"string","const":"Permit","title":"Primarytype","description":"Primary type for the structured data","isRequired":true,"uniqueKey":"eip_712.oneOf.0.primaryType","typeLabel":"string"},"message":{"properties":{"owner":{"type":"string","title":"Owner","description":"Token owner address","isRequired":true,"uniqueKey":"eip_712.oneOf.0.message.owner","typeLabel":"string"},"spender":{"type":"string","title":"Spender","description":"Address authorized to spend tokens","isRequired":true,"uniqueKey":"eip_712.oneOf.0.message.spender","typeLabel":"string"},"value":{"type":"string","title":"Value","description":"Amount to approve (as string)","isRequired":true,"uniqueKey":"eip_712.oneOf.0.message.value","typeLabel":"string"},"nonce":{"type":"string","title":"Nonce","description":"Current permit nonce for the owner","isRequired":true,"uniqueKey":"eip_712.oneOf.0.message.nonce","typeLabel":"string"},"deadline":{"type":"string","title":"Deadline","description":"Permit expiry timestamp","isRequired":true,"uniqueKey":"eip_712.oneOf.0.message.deadline","typeLabel":"string"}},"type":"object","required":["owner","spender","value","nonce","deadline"],"title":"PermitMessage","description":"Permit message data","isRequired":true,"uniqueKey":"eip_712.oneOf.0.message","typeLabel":"PermitMessage · object"}},"uniqueKey":"eip_712.oneOf.0","typeLabel":"PermitTypedDataResponse · object"},{"type":"null","description":"EIP-712 typed data for off-chain permit signing. Present when gas_sponsorship=true.","uniqueKey":"eip_712.oneOf.1","typeLabel":"null"}],"uniqueKey":"eip_712","typeLabel":"PermitTypedDataResponse · object | null"}},"type":"object","title":"ApproveTransferResponse","example":{"eip_712":{"domain":{"chainId":8453,"name":"USD Coin","verifyingContract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","version":"2"},"message":{"deadline":"1735689600","nonce":"0","owner":"0x4A83b4413CF41C3244027e1590E35a0F48403F0c","spender":"0x000000000022D473030F116dDEE9F6B43aC78BA3","value":"115792089237316195423570985008687907853269984665640564039457584007913129639935"},"primaryType":"Permit","types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Permit":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"nonce","type":"uint256"},{"name":"deadline","type":"uint256"}]}}},"uniqueKey":"","typeLabel":"ApproveTransferResponse · object"},"examples":{"Example":{"title":"Example","value":{"eip_712":{"domain":{"chainId":8453,"name":"USD Coin","verifyingContract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","version":"2"},"message":{"deadline":"1735689600","nonce":"0","owner":"0x4A83b4413CF41C3244027e1590E35a0F48403F0c","spender":"0x000000000022D473030F116dDEE9F6B43aC78BA3","value":"115792089237316195423570985008687907853269984665640564039457584007913129639935"},"primaryType":"Permit","types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Permit":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"nonce","type":"uint256"},{"name":"deadline","type":"uint256"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"d70f8548-87a7-43a4-936c-37189ba7e7da":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"e89f6d8c-9ae7-44f6-91ab-c06b98b98bae":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Compass API Key. Get your key [here](https://www.compasslabs.ai/dashboard).","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"5cc70962-0013-441d-bd6f-5cb484ceb892":{"url":"https://api.compasslabs.ai","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Compass API Key. Get your key [here](https://www.compasslabs.ai/dashboard).","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"Your Compass API Key. Get your key [here](https://www.compasslabs.ai/dashboard).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"v2/combined_spec.json"},"subdomain":"compasslabs-f07467e0","siteName":"Compass API Docs","title":"Approve token transfer - Compass API Docs","navMaps":{"firstHrefInVersion":{"V2":{"href":"/v2/api-reference/gas-sponsorship/approve-token-transfer","matchLevel":0},"V1":{"href":"/v1/api-reference/aave-v3/aave-supported-tokens","matchLevel":2}},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T13:11:30.170Z","originalFileLocation":"v2/api-reference/gas-sponsorship/approve-token-transfer.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Set up a one-time Permit2 allowance for gas-sponsored token transfers. Required when using /earn/transfer or /credit/transfer with gas_sponsorship=true. This allowance only needs to be set up once per token. With gas sponsorship (gas_sponsorship=true): - Returns EIP-712 typed data for the owner to sign off-chain - Submit signature + typed data to /prepare - Only works for tokens that support EIP-2612 permit (e.g., USDC) Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set gas_sponsorship=false to receive an unsigned transaction that the owner must sign, submit, and pay gas for.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Compass API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Approve token transfer - Compass API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Set up a one-time Permit2 allowance for gas-sponsored token transfers. Required when using /earn/transfer or /credit/transfer with gas_sponsorship=true. This allowance only needs to be set up once per token. With gas sponsorship (gas_sponsorship=true): - Returns EIP-712 typed data for the owner to sign off-chain - Submit signature + typed data to /prepare - Only works for tokens that support EIP-2612 permit (e.g., USDC) Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set gas_sponsorship=false to receive an unsigned transaction that the owner must sign, submit, and pay gas for.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Compass API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://compasslabs-f07467e0.mintlify.site/_mintlify/api/og/v2?division=Gas+Sponsorship\u0026amp;title=Approve+token+transfer\u0026amp;description=Set+up+a+one-time+Permit2+allowance+for+gas-sponsored+token+transfers.%0A%0ARequired+when+using+%5B%2Fearn%2Ftransfer%5D%28https%3A%2F%2Fdocs.compasslabs.ai%2Fv2%2Fapi-reference%2Fearn%2Ft\u0026amp;theme=3dbf73b4b3dd364abd493b9c\u0026amp;signature=973b52a68b7c69cb36c0285e52f2d9f1aaf6aa8cdd38bd984b40d00204437ad9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Approve token transfer - Compass API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Set up a one-time Permit2 allowance for gas-sponsored token transfers. Required when using /earn/transfer or /credit/transfer with gas_sponsorship=true. This allowance only needs to be set up once per token. With gas sponsorship (gas_sponsorship=true): - Returns EIP-712 typed data for the owner to sign off-chain - Submit signature + typed data to /prepare - Only works for tokens that support EIP-2612 permit (e.g., USDC) Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set gas_sponsorship=false to receive an unsigned transaction that the owner must sign, submit, and pay gas for.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://compasslabs-f07467e0.mintlify.site/_mintlify/api/og/v2?division=Gas+Sponsorship\u0026amp;title=Approve+token+transfer\u0026amp;description=Set+up+a+one-time+Permit2+allowance+for+gas-sponsored+token+transfers.%0A%0ARequired+when+using+%5B%2Fearn%2Ftransfer%5D%28https%3A%2F%2Fdocs.compasslabs.ai%2Fv2%2Fapi-reference%2Fearn%2Ft\u0026amp;theme=3dbf73b4b3dd364abd493b9c\u0026amp;signature=973b52a68b7c69cb36c0285e52f2d9f1aaf6aa8cdd38bd984b40d00204437ad9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/compasslabs-f07467e0/CejAEahS9T_GZmf_/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Compass API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0284c7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/api-reference/gas-sponsorship/approve-token-transfer.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.compasslabs.ai/#organization\",\"name\":\"Compass API Docs\",\"url\":\"https://docs.compasslabs.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/compasslabs-f07467e0/x2NrFgZ7soJbH6sc/logo/light.svg?fit=max\u0026auto=format\u0026n=x2NrFgZ7soJbH6sc\u0026q=85\u0026s=80a04b06674000990914306c6a833cb9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.compasslabs.ai#website\",\"name\":\"Compass API Docs\",\"url\":\"https://docs.compasslabs.ai\",\"publisher\":{\"@id\":\"https://docs.compasslabs.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer#webpage\",\"url\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer\",\"name\":\"Approve token transfer\",\"description\":\"Set up a one-time Permit2 allowance for gas-sponsored token transfers. Required when using /earn/transfer or /credit/transfer with gas_sponsorship=true. This allowance only needs to be set up once per token. With gas sponsorship (gas_sponsorship=true): - Returns EIP-712 typed data for the owner to sign off-chain - Submit signature + typed data to /prepare - Only works for tokens that support EIP-2612 permit (e.g., USDC) Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set gas_sponsorship=false to receive an unsigned transaction that the owner must sign, submit, and pay gas for.\",\"dateModified\":\"2026-11-05T13:11:30.170Z\",\"isPartOf\":{\"@id\":\"https://docs.compasslabs.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gas Sponsorship\",\"item\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Approve token transfer\",\"item\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer#apireference\",\"headline\":\"Approve token transfer\",\"name\":\"Approve token transfer\",\"description\":\"Set up a one-time Permit2 allowance for gas-sponsored token transfers. Required when using /earn/transfer or /credit/transfer with gas_sponsorship=true. This allowance only needs to be set up once per token. With gas sponsorship (gas_sponsorship=true): - Returns EIP-712 typed data for the owner to sign off-chain - Submit signature + typed data to /prepare - Only works for tokens that support EIP-2612 permit (e.g., USDC) Some tokens, like USDT and WETH, do not support EIP-2612 permit. For these tokens, set gas_sponsorship=false to receive an unsigned transaction that the owner must sign, submit, and pay gas for.\",\"url\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer\",\"mainEntityOfPage\":{\"@id\":\"https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer#webpage\"},\"dateModified\":\"2026-11-05T13:11:30.170Z\",\"publisher\":{\"@id\":\"https://docs.compasslabs.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.compasslabs.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Compass API Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Compass API Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v2/api-reference/gas-sponsorship/approve-token-transfer.md","siteName":"Compass API Docs","nav":{"global":{"tabs":[],"anchors":[]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/v2/get_started/overview"}]},{"tab":"API Reference","versions":[{"version":"V2","groups":[{"group":"API Reference","pages":[{"group":"Gas Sponsorship","pages":[{"title":"Prepare gas-sponsored transaction","description":"Prepare a gas-sponsored transaction from signed EIP-712 typed data.\n\nSubmit the `owner`'s off-chain signature along with the EIP-712 typed data that was signed. Returns an unsigned transaction for the `sender` to sign and broadcast.\n\n**How gas sponsorship works:**\n1. Call an endpoint with `gas_sponsorship=true` (e.g., [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account), [/earn/manage](https://docs.compasslabs.ai/v2/api-reference/earn/manage-earn-position), [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account)) to get EIP-712 typed data\n2. Owner signs the typed data off-chain\n3. Submit signature + typed data to this endpoint\n4. Sender signs and broadcasts the returned transaction, paying gas on behalf of the owner\n\n**Note:** For gas-sponsored deposits via [/earn/transfer](https://docs.compasslabs.ai/v2/api-reference/earn/transfer-tokens-tofrom-account) or [/credit/transfer](https://docs.compasslabs.ai/v2/api-reference/credit/transfer-tokens-tofrom-account), the owner must first set up a Permit2 allowance using [/approve_transfer](https://docs.compasslabs.ai/v2/api-reference/gas-sponsorship/approve-token-transfer) (once per token).","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/gas_sponsorship/prepare","href":"/v2/api-reference/gas-sponsorship/prepare-gas-sponsored-transaction"},{"title":"Approve token transfer","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/gas_sponsorship/approve_transfer","href":"/v2/api-reference/gas-sponsorship/approve-token-transfer"}]},{"group":"Earn","pages":[{"title":"List earn positions","description":"List all Earn positions for a given owner with PnL tracking.\n\nReturns position data including current balance, cost basis, and profit and loss.\nUse this endpoint to display portfolio performance, track yields over time, or build\nposition management interfaces.\n\nPositions are tracked across all venue types (vaults and Aave markets). Each\nposition includes the venue address, deposited amount, and performance metrics.","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/positions","href":"/v2/api-reference/earn/list-earn-positions"},{"title":"List earn positions across all chains","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/positions_all","href":"/v2/api-reference/earn/list-earn-positions-across-all-chains"},{"title":"List vaults","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/vaults","href":"/v2/api-reference/earn/list-vaults"},{"title":"List aave markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/aave_markets","href":"/v2/api-reference/earn/list-aave-markets"},{"title":"List pendle markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/pendle_markets","href":"/v2/api-reference/earn/list-pendle-markets"},{"title":"List maple pools","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/maple_pools","href":"/v2/api-reference/earn/list-maple-pools"},{"title":"Quote a swap","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/swap_quote","href":"/v2/api-reference/earn/quote-a-swap"},{"title":"Get token balances","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/earn/balances","href":"/v2/api-reference/earn/get-token-balances"},{"title":"Create earn account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/earn/create_account","href":"/v2/api-reference/earn/create-earn-account"},{"title":"Transfer tokens to/from account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/earn/transfer","href":"/v2/api-reference/earn/transfer-tokens-tofrom-account"},{"title":"Manage earn position","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/earn/manage","href":"/v2/api-reference/earn/manage-earn-position"},{"title":"Swap tokens","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/earn/swap","href":"/v2/api-reference/earn/swap-tokens"},{"title":"Execute multiple earn actions","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/earn/bundle","href":"/v2/api-reference/earn/execute-multiple-earn-actions"}]},{"group":"Bridge","pages":[{"title":"Initiate USDC bridging","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/cctp/burn","href":"/v2/api-reference/bridge/initiate-usdc-bridging"},{"title":"Complete USDC bridging","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/cctp/mint","href":"/v2/api-reference/bridge/complete-usdc-bridging"}]},{"group":"Credit","pages":[{"title":"List credit positions","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/credit/positions","href":"/v2/api-reference/credit/list-credit-positions"},{"title":"Get credit account token balances","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/credit/balances","href":"/v2/api-reference/credit/get-credit-account-token-balances"},{"title":"List looped (leveraged) credit positions","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/credit/looped_positions","href":"/v2/api-reference/credit/list-looped-leveraged-credit-positions"},{"title":"List Euler markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/credit/euler_markets","href":"/v2/api-reference/credit/list-euler-markets"},{"title":"List Morpho markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/credit/morpho_markets","href":"/v2/api-reference/credit/list-morpho-markets"},{"title":"List Aave markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/credit/aave_markets","href":"/v2/api-reference/credit/list-aave-markets"},{"title":"Create credit account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/create_account","href":"/v2/api-reference/credit/create-credit-account"},{"title":"Borrow against collateral","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/borrow","href":"/v2/api-reference/credit/borrow-against-collateral"},{"title":"Open a leveraged loop","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/loop","href":"/v2/api-reference/credit/open-a-leveraged-loop"},{"title":"Unwind a leveraged loop","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/unloop","href":"/v2/api-reference/credit/unwind-a-leveraged-loop"},{"title":"Rebalance the leveraged credit book","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/rebalance","href":"/v2/api-reference/credit/rebalance-the-leveraged-credit-book"},{"title":"Transfer tokens to/from Credit Account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/transfer","href":"/v2/api-reference/credit/transfer-tokens-tofrom-credit-account"},{"title":"Swap tokens","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/swap","href":"/v2/api-reference/credit/swap-tokens"},{"title":"Repay debt and withdraw collateral","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/repay","href":"/v2/api-reference/credit/repay-debt-and-withdraw-collateral"},{"title":"Execute multiple credit actions","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/credit/bundle","href":"/v2/api-reference/credit/execute-multiple-credit-actions"}]},{"group":"Perpetual Trading","pages":[{"title":"List perpetual trading markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/perpetual_trading/opportunities","href":"/v2/api-reference/perpetual-trading/list-perpetual-trading-markets"},{"title":"List perpetual trading positions","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/perpetual_trading/positions","href":"/v2/api-reference/perpetual-trading/list-perpetual-trading-positions"},{"title":"Get OHLCV candles","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/perpetual_trading/candles","href":"/v2/api-reference/perpetual-trading/get-ohlcv-candles"},{"title":"Aggregated Hyperliquid activity for a user","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/perpetual_trading/activity","href":"/v2/api-reference/perpetual-trading/aggregated-hyperliquid-activity-for-a-user"},{"title":"Deposit USDC to perpetual trading account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/deposit","href":"/v2/api-reference/perpetual-trading/deposit-usdc-to-perpetual-trading-account"},{"title":"Build the Bridge2 deposit tx from a signed permit","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/deposit/sponsor_prepare","href":"/v2/api-reference/perpetual-trading/build-the-bridge2-deposit-tx-from-a-signed-permit"},{"title":"Withdraw USDC from perpetual trading account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/withdraw","href":"/v2/api-reference/perpetual-trading/withdraw-usdc-from-perpetual-trading-account"},{"title":"Place market order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/market_order","href":"/v2/api-reference/perpetual-trading/place-market-order"},{"title":"Place limit order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/limit_order","href":"/v2/api-reference/perpetual-trading/place-limit-order"},{"title":"Cancel order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/cancel_order","href":"/v2/api-reference/perpetual-trading/cancel-order"},{"title":"Execute signed action","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/execute","href":"/v2/api-reference/perpetual-trading/execute-signed-action"},{"title":"Approve builder fee","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/approve_builder_fee","href":"/v2/api-reference/perpetual-trading/approve-builder-fee"},{"title":"Enable unified account mode","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/enable_unified_account","href":"/v2/api-reference/perpetual-trading/enable-unified-account-mode"},{"title":"Ensure 1x cross leverage","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/ensure_leverage","href":"/v2/api-reference/perpetual-trading/ensure-1x-cross-leverage"},{"title":"Set leverage (defaults to market maximum)","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/perpetual_trading/set_leverage","href":"/v2/api-reference/perpetual-trading/set-leverage-defaults-to-market-maximum"}]},{"group":"Tokenized Assets","pages":[{"title":"List markets","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/tokenized_assets/markets","href":"/v2/api-reference/tokenized-assets/list-markets"},{"title":"Get a market","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/tokenized_assets/markets/{symbol}","href":"/v2/api-reference/tokenized-assets/get-a-market"},{"title":"List positions","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/tokenized_assets/positions","href":"/v2/api-reference/tokenized-assets/list-positions"},{"title":"Get token balances","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/tokenized_assets/balances","href":"/v2/api-reference/tokenized-assets/get-token-balances"},{"title":"Get order status","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/tokenized_assets/order/{order_hash}","href":"/v2/api-reference/tokenized-assets/get-order-status"},{"title":"List redemption requests","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json get /v2/tokenized_assets/redemptions","href":"/v2/api-reference/tokenized-assets/list-redemption-requests"},{"title":"Create account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/create_account","href":"/v2/api-reference/tokenized-assets/create-account"},{"title":"Transfer tokens to/from account","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/transfer","href":"/v2/api-reference/tokenized-assets/transfer-tokens-tofrom-account"},{"title":"Quote an order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/quote","href":"/v2/api-reference/tokenized-assets/quote-an-order"},{"title":"Build an order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/order","href":"/v2/api-reference/tokenized-assets/build-an-order"},{"title":"Submit a signed order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/order/submit","href":"/v2/api-reference/tokenized-assets/submit-a-signed-order"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/order/{order_hash}/cancel","href":"/v2/api-reference/tokenized-assets/cancel-an-order"},{"title":"Charge a partner fee","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/order/{order_hash}/charge_fee","href":"/v2/api-reference/tokenized-assets/charge-a-partner-fee"},{"title":"Buy an RWA yield token","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/transact/buy","href":"/v2/api-reference/tokenized-assets/buy-an-rwa-yield-token"},{"title":"Sell an RWA yield token","deprecated":null,"version":null,"openapi":"/v2/combined_spec.json post /v2/tokenized_assets/transact/sell","href":"/v2/api-reference/tokenized-assets/sell-an-rwa-yield-token"}]}]}]},{"version":"V1","pages":[{"title":"V1","href":"/v1/api-reference/aave-v3/aave-supported-tokens"}]}]}]},"basePath":"","title":"Approve token transfer - Compass API Docs","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}