Reference

Swap tokens

get

Gets a quote for a swap between two tokens given an amount. If a to address is provided, the swap execution data will be included in the response to be used to build the calldata to be executed on-chain. Make sure to not tamper with the arguments provided in the response as it can lead to loss of funds. Only possible to trade whitelisted tokens specified on the /tokens endpoint. Permissionless trading is coming soon. Native token (BERA) is specified as zero address (0x0000000000000000000000000000000000000000)

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
tokenInstringRequired

Input token address

Default: 0x0000000000000000000000000000000000000000Example: 0x6969696969696969696969696969696969696969Pattern: ^0x(.*)$
tokenOutstringRequired

Output token address

Default: 0x6969696969696969696969696969696969696969Example: 0x6969696969696969696969696969696969696969Pattern: ^0x(.*)$
amountany ofRequired

Amount of input token

Default: 1000000000000000000
string · numericOptional
or
numberOptional

Amount of input token

Default: 1000000000000000000
tostringOptional

Recipient address, if not set, calldata cannot be generated

Example: 0x6969696969696969696969696969696969696969Pattern: ^0x(.*)$
slippagenumber · max: 1Optional

Slippage tolerance in decimal between 0 (0%) and 1 (100%), default 0.02 (=2%)

Default: 0.02Example: 0.01
poolBlackliststring[]Optional

Specify which pool addresses to not use on path finding. Otherwise all will be used by default. Becareful as some pools share the same poolAddress and the blacklist will ignore multiple pools

Example: 0x6969696969696969696969696969696969696969
referralCodenumberOptional

Partner referral code

Responses
200Success
Responseany of
or
or
get
/v1/swap

Token List

get

Get the list of tokens for trading on the Ooga Booga's Smart Order Routing

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200Success
get
/v1/tokens

Liquidity Sources

get

Get all the liquidity sources available on the router to be used on swap

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200Success
get
/v1/liquidity-sources
200Success

Last updated