ShapeShift Public API

The ShapeShift Public API (v1) — supported assets and chains, indicative swap rates, executable swap quotes, swap-status tracking, and the affiliate/partner program authenticated with Sign-In With Ethereum.

OpenAPI Specification

classic-shapeshift-openapi-original.json Raw ↑
{"openapi":"3.0.0","info":{"version":"1.0.0","title":"ShapeShift Public API","description":"The ShapeShift Public API lets you integrate multi-chain swap functionality into your application. Fetch rates from multiple DEX aggregators and bridges, build executable quotes, and track swaps across supported blockchains.\n\n## Base URL\n\n```\nhttps://api.shapeshift.com\n```\n\nAll endpoints are versioned under `/v1` (e.g. `https://api.shapeshift.com/v1/swap/rates`). This interactive reference is served at `https://api.shapeshift.com/docs`, and the raw OpenAPI document at `https://api.shapeshift.com/docs/json`.\n\n## Two ways to integrate\n\n1. **Swap Widget SDK** — a drop-in React component with built-in UI, wallet connection, and multi-chain support. The fastest path. See the **Swap Widget SDK** section.\n2. **REST API** — call the endpoints directly and build your own UI for full control over UX. See the **REST API Guide** section, then the per-endpoint reference below.\n\n## Affiliate tracking (optional)\n\nSend an `X-Partner-Code` header with your registered partner code (e.g. `your-partner-code`) on the swap endpoints to attribute swaps for affiliate revenue share. The API attributes the swap to your affiliate account and applies your configured fee (bps) automatically. All endpoints work without it — unattributed swaps use the default fee. See the [Affiliate Program guide](https://github.com/shapeshift/web/blob/develop/docs/affiliates.md) for how to obtain a code.\n\n## Asset IDs (CAIP-19)\n\nAssets are identified with [CAIP-19](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md): `{chainId}/{assetNamespace}:{assetReference}`\n\n- Native ETH: `eip155:1/slip44:60`\n- USDC on Ethereum: `eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`\n- Native BTC: `bip122:000000000019d6689c085ae165831e93/slip44:0`\n\nChains use [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) (e.g. `eip155:1`). Use `GET /v1/chains` and `GET /v1/assets` to discover supported values.\n\n## Errors\n\nErrors return the appropriate HTTP status and a JSON body:\n\n```json\n{ \"error\": \"Human-readable message\", \"code\": \"MACHINE_CODE\", \"details\": [] }\n```\n\n`code` and `details` are present where applicable (e.g. `QUOTE_NOT_FOUND`, `TX_HASH_REQUIRED`, `TX_HASH_MISMATCH`, `RATE_LIMIT_EXCEEDED`, validation `details`).\n\n## Rate limiting\n\nEndpoints are rate limited per IP on a fixed 60-second window. A global limit applies across all endpoints, and individual endpoint groups (data, rates, quote, status, affiliate) have their own independent limits on top of it — so a request counts against both. When either is exceeded, the API returns `429` with code `RATE_LIMIT_EXCEEDED` and these headers:\n\n- `Retry-After` — seconds until the window resets\n- `RateLimit-Limit` — max requests allowed per window\n- `RateLimit-Remaining` — requests remaining in the current window\n- `RateLimit-Reset` — seconds until the window resets\n\nBack off using `Retry-After` and avoid polling faster than necessary (see the REST API Guide for polling guidance).\n"},"servers":[{"url":"https://api.shapeshift.com"},{"url":"http://localhost:3001"}],"components":{"schemas":{"RateLimitError":{"type":"object","properties":{"error":{"type":"string","example":"Too many requests, please try again later"},"code":{"type":"string","enum":["RATE_LIMIT_EXCEEDED"],"example":"RATE_LIMIT_EXCEEDED"}},"required":["error","code"]},"Asset":{"type":"object","properties":{"assetId":{"type":"string","example":"eip155:1/slip44:60"},"chainId":{"type":"string","example":"eip155:1"},"name":{"type":"string","example":"Ethereum"},"symbol":{"type":"string","example":"ETH"},"precision":{"type":"number","example":18},"color":{"type":"string","example":"#5C6BC0"},"icon":{"type":"string","example":"https://assets.coincap.io/assets/icons/eth@2x.png"},"networkName":{"type":"string","example":"Ethereum"},"networkColor":{"type":"string","example":"#5C6BC0"},"networkIcon":{"type":"string","example":"https://assets.coincap.io/assets/icons/eth@2x.png"},"explorer":{"type":"string","example":"https://etherscan.io"},"explorerAddressLink":{"type":"string","example":"https://etherscan.io/address/"},"explorerTxLink":{"type":"string","example":"https://etherscan.io/tx/"},"relatedAssetKey":{"type":"string","nullable":true}},"required":["assetId","chainId","name","symbol","precision","color","icon","explorer","explorerAddressLink","explorerTxLink","relatedAssetKey"]},"AffiliateConfig":{"type":"object","properties":{"id":{"type":"string","example":"abc123"},"walletAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"receiveAddress":{"type":"string","nullable":true,"pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"partnerCode":{"type":"string","example":"mypartner"},"partnerBps":{"type":"number","example":50},"shapeshiftBps":{"type":"number","example":10},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","walletAddress","receiveAddress","partnerCode","partnerBps","shapeshiftBps","isActive","createdAt","updatedAt"]},"AffiliateSwap":{"type":"object","properties":{"swapId":{"type":"string","example":"swap-uuid-1234"},"status":{"type":"string","example":"completed"},"sellAsset":{"$ref":"#/components/schemas/Asset"},"buyAsset":{"$ref":"#/components/schemas/Asset"},"sellAmountCryptoPrecision":{"type":"string","example":"1.0"},"sellAmountUsd":{"type":"string","nullable":true,"example":"1234.56"},"buyAmountCryptoPrecision":{"type":"string","nullable":true,"example":"948.0"},"buyAmountUsd":{"type":"string","nullable":true,"example":"1234.56"},"affiliateFeeAmountUsd":{"type":"string","nullable":true,"example":"3.70"},"affiliateBps":{"type":"integer","minimum":0,"example":60},"partnerBps":{"type":"integer","nullable":true,"minimum":0,"example":20},"shapeshiftBps":{"type":"integer","minimum":0,"example":10},"swapperName":{"type":"string","example":"THORChain"},"sellTxHash":{"type":"string","nullable":true,"example":"0xabc123"},"buyTxHash":{"type":"string","nullable":true,"example":"0xdef456"},"isAffiliateVerified":{"type":"boolean","nullable":true,"example":true},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["swapId","status","sellAsset","buyAsset","sellAmountCryptoPrecision","sellAmountUsd","buyAmountCryptoPrecision","buyAmountUsd","affiliateFeeAmountUsd","affiliateBps","partnerBps","shapeshiftBps","swapperName","sellTxHash","buyTxHash","isAffiliateVerified","createdAt"]},"AffiliateSwapsResponse":{"type":"object","properties":{"swaps":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateSwap"}},"nextCursor":{"type":"string","nullable":true,"example":"swap-uuid-1234"}},"required":["swaps","nextCursor"]},"AffiliateStatsResponse":{"type":"object","properties":{"totalSwaps":{"type":"number","example":42},"totalVolumeUsd":{"type":"string","example":"12345.67"},"totalFeesEarnedUsd":{"type":"string","example":"44.44"}},"required":["totalSwaps","totalVolumeUsd","totalFeesEarnedUsd"]},"SiweNonceResponse":{"type":"object","properties":{"nonce":{"type":"string","example":"abcdef123456"}},"required":["nonce"]},"SiweVerifyResponse":{"type":"object","properties":{"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"address":{"type":"string","example":"0x1234567890123456789012345678901234567890"}},"required":["token","address"]},"Chain":{"type":"object","properties":{"chainId":{"type":"string","example":"eip155:1"},"name":{"type":"string","example":"Ethereum"},"type":{"type":"string","enum":["evm","utxo","cosmos","solana","tron","sui","near","starknet","ton"],"example":"evm"},"symbol":{"type":"string","example":"ETH"},"precision":{"type":"number","example":18},"color":{"type":"string","example":"#5C6BC0"},"networkColor":{"type":"string","example":"#5C6BC0"},"icon":{"type":"string","example":"https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png"},"networkIcon":{"type":"string","example":"https://rawcdn.githack.com/trustwallet/assets/32e51d582a890b3dd3135fe3ee7c20c2fd699a6d/blockchains/ethereum/info/logo.png"},"explorer":{"type":"string","example":"https://etherscan.io"},"explorerAddressLink":{"type":"string","example":"https://etherscan.io/address/"},"explorerTxLink":{"type":"string","example":"https://etherscan.io/tx/"},"nativeAssetId":{"type":"string","example":"eip155:1/slip44:60"}},"required":["chainId","name","type","symbol","precision","color","explorer","explorerAddressLink","explorerTxLink","nativeAssetId"]},"PartnerResolution":{"type":"object","properties":{"partnerAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"partnerBps":{"type":"integer","minimum":0,"example":50},"partnerCode":{"type":"string","example":"mypartner"},"shapeshiftBps":{"type":"integer","minimum":0,"example":10}},"required":["partnerAddress","partnerBps","partnerCode","shapeshiftBps"]},"QuoteStep":{"type":"object","properties":{"sellAsset":{"$ref":"#/components/schemas/Asset"},"buyAsset":{"$ref":"#/components/schemas/Asset"},"sellAmountCryptoBaseUnit":{"type":"string","example":"1000000000000000000"},"buyAmountAfterFeesCryptoBaseUnit":{"type":"string","example":"995000000"},"allowanceContract":{"type":"string","example":"0xdef1c0ded9bec7f1a1670819833240f027b25eff"},"estimatedExecutionTimeMs":{"type":"number","example":60000},"source":{"type":"string","example":"0x"},"transactionData":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["evm"],"example":"evm"},"chainId":{"type":"number","example":1},"to":{"type":"string","example":"0xdef1c0ded9bec7f1a1670819833240f027b25eff"},"data":{"type":"string","example":"0x..."},"value":{"type":"string","example":"1000000000000000000"},"gasLimit":{"type":"string","example":"300000"},"signatureRequired":{"type":"object","properties":{"type":{"type":"string","enum":["permit2"]},"eip712":{"type":"object","additionalProperties":{"nullable":true}}},"required":["type","eip712"]}},"required":["type","chainId","to","data","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["solana"],"example":"solana"},"instructions":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"string"},"keys":{"type":"array","items":{"type":"object","properties":{"pubkey":{"type":"string"},"isSigner":{"type":"boolean"},"isWritable":{"type":"boolean"}},"required":["pubkey","isSigner","isWritable"]}},"data":{"type":"string"}},"required":["programId","keys","data"]}},"addressLookupTableAddresses":{"type":"array","items":{"type":"string"}}},"required":["type","instructions","addressLookupTableAddresses"]},{"type":"object","properties":{"type":{"type":"string","enum":["utxo_psbt"],"example":"utxo_psbt"},"psbt":{"type":"string"},"opReturnData":{"type":"string"},"depositAddress":{"type":"string"},"value":{"type":"string"}},"required":["type","psbt"]},{"type":"object","properties":{"type":{"type":"string","enum":["utxo_deposit"],"example":"utxo_deposit"},"depositAddress":{"type":"string"},"memo":{"type":"string"},"value":{"type":"string"}},"required":["type","depositAddress","memo","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["cosmos"],"example":"cosmos"},"chainId":{"type":"string"},"to":{"type":"string"},"value":{"type":"string"},"memo":{"type":"string"}},"required":["type","chainId","to","value"]}]}},"required":["sellAsset","buyAsset","sellAmountCryptoBaseUnit","buyAmountAfterFeesCryptoBaseUnit","allowanceContract","source"]},"QuoteResponse":{"type":"object","properties":{"quoteId":{"type":"string","format":"uuid"},"swapperName":{"type":"string","example":"0x"},"rate":{"type":"string","example":"0.995"},"sellAsset":{"$ref":"#/components/schemas/Asset"},"buyAsset":{"$ref":"#/components/schemas/Asset"},"sellAmountCryptoBaseUnit":{"type":"string"},"buyAmountBeforeFeesCryptoBaseUnit":{"type":"string"},"buyAmountAfterFeesCryptoBaseUnit":{"type":"string"},"affiliateBps":{"type":"string","description":"Total on-chain fee in bps.","example":"60"},"partnerBps":{"type":"string","description":"Partner share in bps.","example":"50"},"shapeshiftBps":{"type":"string","description":"ShapeShift platform fee in bps.","example":"10"},"slippageTolerancePercentageDecimal":{"type":"string","example":"0.01"},"networkFeeCryptoBaseUnit":{"type":"string","example":"23000"},"approval":{"type":"object","properties":{"isRequired":{"type":"boolean","example":true},"spender":{"type":"string","example":"0xdef1c0ded9bec7f1a1670819833240f027b25eff"},"approvalTx":{"type":"object","properties":{"to":{"type":"string","example":"0xdef1c0ded9bec7f1a1670819833240f027b25eff"},"data":{"type":"string","example":"0x"},"value":{"type":"string","example":"0"}},"required":["to","data","value"]}},"required":["isRequired","spender"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/QuoteStep"}},"expiresAt":{"type":"number"}},"required":["quoteId","swapperName","rate","sellAsset","buyAsset","sellAmountCryptoBaseUnit","buyAmountBeforeFeesCryptoBaseUnit","buyAmountAfterFeesCryptoBaseUnit","affiliateBps","shapeshiftBps","approval","steps","expiresAt"]},"RateResponse":{"type":"object","properties":{"rates":{"type":"array","items":{"type":"object","properties":{"swapperName":{"type":"string"},"rate":{"type":"string"},"buyAmountCryptoBaseUnit":{"type":"string"},"sellAmountCryptoBaseUnit":{"type":"string"},"steps":{"type":"number"},"estimatedExecutionTimeMs":{"type":"number"},"priceImpactPercentageDecimal":{"type":"string"},"affiliateBps":{"type":"string","description":"Total on-chain fee in bps.","example":"60"},"partnerBps":{"type":"string","description":"Partner share in bps.","example":"50"},"shapeshiftBps":{"type":"string","description":"ShapeShift platform fee in bps.","example":"10"},"networkFeeCryptoBaseUnit":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["swapperName","rate","buyAmountCryptoBaseUnit","sellAmountCryptoBaseUnit","steps","affiliateBps","shapeshiftBps"]}},"timestamp":{"type":"number"},"expiresAt":{"type":"number"}},"required":["rates","timestamp","expiresAt"]},"SwapStatusResponse":{"type":"object","properties":{"quoteId":{"type":"string","format":"uuid"},"txHash":{"type":"string"},"status":{"type":"string","enum":["pending","submitted","confirmed","failed"]},"swapperName":{"type":"string"},"sellAssetId":{"type":"string"},"buyAssetId":{"type":"string"},"sellAmountCryptoBaseUnit":{"type":"string"},"buyAmountAfterFeesCryptoBaseUnit":{"type":"string"},"partnerAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"affiliateBps":{"type":"string","description":"Total on-chain fee in bps.","example":"60"},"partnerBps":{"type":"string","description":"Partner share in bps.","example":"50"},"shapeshiftBps":{"type":"string","description":"ShapeShift platform fee in bps.","example":"10"},"registeredAt":{"type":"number"},"buyTxHash":{"type":"string"},"isAffiliateVerified":{"type":"boolean"}},"required":["quoteId","status","swapperName","sellAssetId","buyAssetId","sellAmountCryptoBaseUnit","buyAmountAfterFeesCryptoBaseUnit","affiliateBps","shapeshiftBps"]}},"parameters":{}},"paths":{"/v1/affiliate":{"post":{"operationId":"createAffiliate","summary":"Create affiliate","description":"Register a new affiliate. Requires a valid SIWE JWT in the Authorization header.","tags":["Affiliate"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"walletAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"receiveAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"partnerCode":{"type":"string","minLength":3,"maxLength":32,"pattern":"^[a-z0-9]+$"},"bps":{"type":"integer","minimum":0,"maximum":1000}},"required":["walletAddress","partnerCode","bps"]}}}},"responses":{"201":{"description":"Affiliate created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateConfig"}}}},"400":{"description":"Invalid request body"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"409":{"description":"Affiliate already exists"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}}},"/v1/affiliate/{address}":{"get":{"operationId":"getAffiliate","summary":"Get affiliate config","description":"Retrieve affiliate configuration for a given wallet address.","tags":["Affiliate"],"parameters":[{"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"required":true,"name":"address","in":"path"}],"responses":{"200":{"description":"Affiliate configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateConfig"}}}},"400":{"description":"Invalid request parameters"},"404":{"description":"Affiliate not found"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}},"patch":{"operationId":"updateAffiliate","summary":"Update affiliate","description":"Update an existing affiliate configuration. Requires a valid SIWE JWT in the Authorization header.","tags":["Affiliate"],"parameters":[{"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"required":true,"name":"address","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"receiveAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","example":"0x1234567890123456789012345678901234567890"},"bps":{"type":"integer","minimum":0,"maximum":1000}}}}}},"responses":{"200":{"description":"Updated affiliate configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateConfig"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Affiliate not found"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}}},"/v1/affiliate/stats":{"get":{"operationId":"getAffiliateStats","summary":"Get affiliate statistics","description":"Retrieve aggregated swap statistics for an affiliate by partnerCode. Returns total swaps, volume, and fees earned. Supports optional date range filtering.","tags":["Affiliate"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":32,"pattern":"^[a-z0-9]+$"},"required":true,"name":"partnerCode","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"endDate","in":"query"}],"responses":{"200":{"description":"Affiliate statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateStatsResponse"}}}},"400":{"description":"Invalid request parameters"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}}},"/v1/affiliate/swaps":{"get":{"operationId":"getAffiliateSwaps","summary":"Get affiliate swaps","description":"Retrieve paginated swap history for an affiliate by partnerCode. Supports optional date range filtering.","tags":["Affiliate"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":32,"pattern":"^[a-z0-9]+$"},"required":true,"name":"partnerCode","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"endDate","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Affiliate swaps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateSwapsResponse"}}}},"400":{"description":"Invalid query parameters"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}}},"/v1/assets":{"get":{"operationId":"listAssets","summary":"List supported assets","description":"Get a list of all supported assets, optionally filtered by chain.","tags":["Supported Assets"],"parameters":[{"schema":{"type":"string","example":"eip155:1"},"required":false,"name":"chainId","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":1000,"default":100,"example":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0,"example":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of assets","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}},"timestamp":{"type":"number"}},"required":["assets","timestamp"]}}}},"400":{"description":"Invalid query parameters"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"}}}},"/v1/assets/{assetId}":{"get":{"operationId":"getAssetById","summary":"Get asset by ID","description":"Get details of a specific asset by its ID (URL encoded).","tags":["Supported Assets"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"eip155:1/slip44:60"},"required":true,"name":"assetId","in":"path"}],"responses":{"200":{"description":"Asset details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"400":{"description":"Invalid asset ID"},"404":{"description":"Asset not found"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"}}}},"/v1/assets/count":{"get":{"operationId":"getAssetCount","summary":"Get asset count","description":"Get the total number of supported assets, optionally filtered by chain.","tags":["Supported Assets"],"parameters":[{"schema":{"type":"string","example":"eip155:1"},"required":false,"name":"chainId","in":"query"}],"responses":{"200":{"description":"Asset count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","example":5000},"timestamp":{"type":"number"}},"required":["count","timestamp"]}}}},"400":{"description":"Invalid query parameters"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"}}}},"/v1/auth/siwe/nonce":{"post":{"operationId":"siweNonce","summary":"Get SIWE nonce","description":"Request a nonce for Sign-In with Ethereum (SIWE) authentication.","tags":["Auth"],"responses":{"200":{"description":"SIWE nonce","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiweNonceResponse"}}}},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}}},"/v1/auth/siwe/verify":{"post":{"operationId":"siweVerify","summary":"Verify SIWE signature","description":"Verify a Sign-In with Ethereum (SIWE) message and signature. Returns a JWT token on success.","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"signature":{"type":"string"}},"required":["message","signature"]}}}},"responses":{"200":{"description":"Authentication successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiweVerifyResponse"}}}},"400":{"description":"Invalid request body"},"401":{"description":"Invalid signature"},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"},"503":{"description":"Swap service unavailable"},"504":{"description":"Swap service timed out"}}}},"/v1/chains":{"get":{"operationId":"listChains","summary":"List supported chains","description":"Get a list of all supported blockchain networks, sorted alphabetically by name.","tags":["Supported Chains"],"responses":{"200":{"description":"List of chains","content":{"application/json":{"schema":{"type":"object","properties":{"chains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}},"timestamp":{"type":"number"}},"required":["chains","timestamp"]}}}},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"integer","example":60}},"RateLimit-Remaining":{"description":"Requests remaining in the current window","schema":{"type":"integer","example":0}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error"}}}},"/v1/chains/count":{"get":{"operationId":"getChainCount","summary":"Get chain count","description":"Get the total number of supported blockchain networks.","tags":["Supported Chains"],"responses":{"200":{"description":"Chain count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","example":28},"timestamp":{"type":"number"}},"required":["count","timestamp"]}}}},"429":{"description":"Rate limit exceeded. Includes Retry-After header with seconds until reset.","headers":{"Retry-After":{"description":"Seconds until the rate limit window resets","schema":{"type":"integer","example":30}},"RateLimit-Limit":{"description":"Maximum requests allowed per window","schema":{"type":"i

# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/classic/refs/heads/main/openapi/classic-shapeshift-openapi-original.json