๐Ÿ“—API

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

get
Responses
200

OK

application/json
get
/status
200

OK

List multi-chain markets

get
Responses
200

OK

application/json
get
/v1/markets
200

OK

Get market information and position for an optional account

get
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Query parameters
accountstringOptional

Example: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF

Example: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
Responses
200

OK

No content

get
/v1/markets/{chainId}/{marketId}
200

OK

No content

Get the estimated post-leverage position

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
collateralAmountstringOptionalExample: 1
slippageintegerOptionalExample: 100
Responses
200

OK

application/json
post
/v1/markets/{chainId}/{marketId}/leverage
200

OK

Get the estimated post-deleverage position

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
baseAmountstringOptionalExample: 1000
slippageintegerOptionalExample: 100
Responses
200

OK

No content

post
/v1/markets/{chainId}/{marketId}/deleverage
200

OK

No content

Get the estimated post-collateral-swap position

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
srcAmountstringOptionalExample: 1
slippageintegerOptionalExample: 100
Responses
200

OK

No content

post
/v1/markets/{chainId}/{marketId}/collateral-swap
200

OK

No content

List supported tokens for zaps

get
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
Responses
200

OK

application/json
get
/v1/{chainId}/zap-tokens
200

OK

Get the estimated post-zap-supply

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Query parameters
permit2TypestringOptional

Example: permit, approve

Example: permit
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
srcAmountstringOptionalExample: 10
slippageintegerOptionalExample: 100
Responses
200

OK

No content

post
/v1/markets/{chainId}/{marketId}/zap-supply
200

OK

No content

Get the estimated post-zap-withdraw

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Query parameters
permit2TypestringOptional

Example: permit, approve

Example: permit
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
srcAmountstringOptionalExample: 1
slippageintegerOptionalExample: 100
Responses
200

OK

No content

post
/v1/markets/{chainId}/{marketId}/zap-withdraw
200

OK

No content

Get the estimated post-zap-repay

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Query parameters
permit2TypestringOptional

Example: permit, approve

Example: permit
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
srcAmountstringOptionalExample: 10
slippageintegerOptionalExample: 100
Responses
200

OK

No content

post
/v1/markets/{chainId}/{marketId}/zap-repay
200

OK

No content

Get the estimated post-zap-borrow

post
Path parameters
chainIdintegerRequired

Example: 137

Example: 137
marketIdstringRequired

Example: usdc

Example: usdc
Body
accountstringRequiredExample: 0x0FBeABcaFCf817d47E10a7bCFC15ba194dbD4EEF
srcAmountstringOptionalExample: 100
slippageintegerOptionalExample: 100
Responses
200

OK

No content

post
/v1/markets/{chainId}/{marketId}/zap-borrow
200

OK

No content

Get transaction data

post
Body
or
Responses
200

OK

application/json
post
/v1/transactions/build
200

OK

Last updated