📗API
For a more comprehensive protocol support and enhanced position and market information, we recommend using the Lending SDK.
GitHub
https://github.com/dinngo/compound-kit-api
API Server
https://compound-kit-api.protocolink.com
Swagger Docs
https://compound-kit-api.protocolink.com/docs
Returns the current version of the API
GEThttps://compound-kit-api.protocolink.com/status
Response
OK
Body
versionstring
Example: "0.1.3"
Request
Response
List multi-chain markets
GEThttps://compound-kit-api.protocolink.com/v1/markets
Response
OK
Body
marketGroupsarray of object
Request
Response
Get market information and position for an optional account
GEThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Query parameters
Response
OK
Request
Get the estimated post-leverage position
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/leverage
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
collateralTokenTokenWETH (object)
collateralAmountstring
Example: "1"
slippageinteger
Example: 100
Response
OK
Body
quotationobject
approvalsarray of object
logicsLeverageLogicsResponse (array of one of)
Request
Response
Get the estimated post-deleverage position
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/deleverage
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
collateralTokenTokenWETH (object)
baseAmountstring
Example: "1000"
slippageinteger
Example: 100
Response
OK
Request
Get the estimated post-collateral-swap position
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/collateral-swap
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
srcTokenTokenWETH (object)
srcAmountstring
Example: "1"
destTokenTokenMATIC (object)
slippageinteger
Example: 100
Response
OK
Request
List supported tokens for zaps
GEThttps://compound-kit-api.protocolink.com/v1/{chainId}/zap-tokens
Path parameters
chainId*integer
Example: 137
137
Response
OK
Body
tokensarray of TokenUSDC (object)
Request
Response
Get the estimated post-zap-supply
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/zap-supply
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Query parameters
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
srcTokenTokenMATIC (object)
srcAmountstring
Example: "10"
destTokenTokenWETH (object)
slippageinteger
Example: 100
Response
OK
Request
Get the estimated post-zap-withdraw
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/zap-withdraw
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Query parameters
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
srcTokenTokenWETH (object)
srcAmountstring
Example: "1"
destTokenTokenMATIC (object)
slippageinteger
Example: 100
Response
OK
Request
Get the estimated post-zap-repay
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/zap-repay
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Query parameters
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
srcTokenTokenMATIC (object)
srcAmountstring
Example: "10"
slippageinteger
Example: 100
Response
OK
Request
Get the estimated post-zap-borrow
POSThttps://compound-kit-api.protocolink.com/v1/markets/{chainId}/{marketId}/zap-borrow
Path parameters
chainId*integer
Example: 137
137
marketId*string
Example: usdc
"usdc"
Body
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
srcAmountstring
Example: "100"
destTokenTokenMATIC (object)
slippageinteger
Example: 100
Response
OK
Request
Get transaction data
POSThttps://compound-kit-api.protocolink.com/v1/transactions/build
Body
chainId*integer
Example: 137
account*string
Example: "0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF"
logics*LeverageLogicsResponse (array of one of)
permitDataPermitData (object)
permitSigstring
Example: "0x00"
Response
OK
Body
tostring
Example: "0xf4dEf6B4389eAb49dF2a7D67890810e5249B5E70"
datastring
Example: "0x..."
valuestring
Example: "0"
Request
Response
Last updated