Reference
Last updated
Last updated
Get the calldata for approving the router to spend your tokens on OBRouter
/v1/approve
Token to approve address
0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B
^0x(.*)$
Amount to approve, defaults to max uint256 if not provided
Amount to approve, defaults to max uint256 if not provided
Get the allowance for the OBRouter to spend your tokens
/v1/approve/allowance
EVM Address
0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B
^0x(.*)$
EVM Address
0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B
^0x(.*)$
Gets a quote for a swap between two tokens given an amount.<br> <ul> <li> 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.</li> <li> Make sure to not tamper with the arguments provided in the response as it can lead to loss of funds.</li> <li> Only possible to trade whitelisted tokens specified on the /tokens
endpoint. Permissionless trading is coming soon.</li> <li> Native token (BERA) is specified as zero address (0x0000000000000000000000000000000000000000
)</li>
/v1/swap
Input token address
0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B
^0x(.*)$
Output token address
0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B
^0x(.*)$
Amount of input token
Amount of input token
Amount of input token
Recipient address, if not set, calldata cannot be generated
0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B
^0x(.*)$
Slippage tolerance in percentage between 0 and 1, default 0.02 (2%)
0.01
Slippage tolerance in percentage between 0 and 1, default 0.02 (2%)
Slippage tolerance in percentage between 0 and 1, default 0.02 (2%)