For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Base Trading

Swap quotes and execution on Base.

Get Base Chain Swap Quote

get

Fetches a quote for buying or selling tokens on Base chain. Amount is human-readable. Collateral can be "usdc" (default) or "eth". Plans Included = Builder, Architect, Enterprise Cost per request = 5 credits.

Authorizations
X-API-KEYstringRequired
Query parameters
addressstringRequired

Token address (EVM format).

Example: 0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b
amountnumberOptional

Human-readable amount.

Example: 1
amount_rawstringOptional

Raw unit amount (overrides amount).

typestring · enumRequired

Trade type.

Example: buyPossible values:
collateralstring · enumOptional

Collateral token used as the payment/receive token.

Default: ethExample: ethPossible values:
Responses
200

Quote retrieved successfully

application/json
objectOptional
get/api/trading/base/v2/quote
GET /api/trading/base/v2/quote?address=text&type=buy HTTP/1.1
Host: api.cielo.finance
X-API-KEY: YOUR_API_KEY
Accept: */*
{}

Execute Base Chain Swap

post

Executes a token swap on Base chain. Amount is human-readable. Collateral determines which token is used as payment (buy) or received (sell). Slippage is in basis points (50 = 0.5%). Requires both X-API-KEY and Authorization Bearer token. Plans Included = Builder, Architect, Enterprise Cost per request = 1 credit.

Authorizations
X-API-KEYstringRequired
Header parameters
AuthorizationstringRequired

Bearer token for user authentication.

Body
mintstringRequired

Token address (EVM format).

Example: 0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b
typestring · enumRequired

Trade direction.

Example: buyPossible values:
amountnumberOptional

Human-readable amount. Provide either amount or amount_raw, not both.

Example: 1
amount_rawstringOptional

Raw amount in smallest unit. Overrides amount.

slippageintegerOptional

Slippage in basis points (50 = 0.5%). Default 50.

Default: 50Example: 50
collateralstring · enumOptional

Collateral token. Default eth.

Default: ethExample: ethPossible values:
trading_walletstringOptional

EVM trading wallet address to use for the swap.

Example: 0x1234567890abcdef1234567890abcdef12345678
Responses
200

Swap executed successfully

application/json
statusstringOptionalExample: ok
post/api/trading/base/v2/swap
POST /api/trading/base/v2/swap HTTP/1.1
Host: api.cielo.finance
X-API-KEY: YOUR_API_KEY
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 192

{
  "mint": "0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b",
  "type": "buy",
  "amount": 1,
  "amount_raw": "text",
  "slippage": 50,
  "collateral": "eth",
  "trading_wallet": "0x1234567890abcdef1234567890abcdef12345678"
}
{
  "status": "ok",
  "data": {
    "inputAmount": "text",
    "outputAmount": "text",
    "txHash": "text"
  }
}

Last updated