v1

latestOpenAPI 3.0.02026-08-0451764.0 KB
Quote

Quote and sign in one request

This endpoint streamlines the swap process by combining the quote generation and signing steps into a single request. Users can obtain real-time pricing information for an asset swap and simultaneously receive the required signature and transaction data for execution on the blockchain. This unified flow reduces latency, simplifies integration, and ensures secure, ready-to-broadcast transactions without the need for multiple API calls.

get/rfq/v2/quote-sign/{chainId}

Path parameters

chainIdinteger required

ID of the blockchain network

Query parameters

pool_addressstring

Address of the pool. If not present, the best pool will be calculated

time_in_secondsinteger

Amount of time between accepting a quote and receiving the quote on the blockchain. As this value increases, the quote will get worse for the user.

output_amountstring

Desired quantity of assets to receive as part of the swap. This field is mutually exclusive with input_amount

input_amountstring

Desired quantity of assets you are willing to exchange. This field is mutually exclusive with output_amount

input_asset_symbolstring required

Identifier of the asset you want to provide for the swap. Should correspond to the asset name returned from the pool call

output_asset_symbolstring required

Identifier of the asset you want to receive in the swap. Should correspond to the asset name returned from the pool call

destination_addressstring required

Address that will receive the output token

sender_addressstring

For DEX aggregator partners that are using their own smart contract to mediate the interaction between users and Blade. Aggregators should use the address of the account that they will pull tokens from (i.e., the EOA user address) as opposed to the address of their deployed contract. By default, destination_address will be used.

aux_datastring

For use with the calldata swap feature, it can be set to any string and is used for identification purposes in the event logs. By default is 0x436c697070657200000000000000000000000000000000000000000000000000 that is the representation of Clipper

calldataboolean

Send this as true if we want to get the bytes representation of the swap in the response. Client can use this to be sent directly to the pool contract for execution.

Response

Quote and signature generated successfully

chain_idinteger required

Represents the ID of the chain

input_asset_addressstring required

Contract address of the asset you want to provide for the swap

output_asset_addressstring required

Contract address of the asset you want to receive in the swap

input_amountstring required

Amount of assets to be exchanged

output_amountstring required

Amount of assets you will receive in the exchange

good_untilstring required

Number of seconds that quotes live. It can also contained a packed representation of the state

destination_addressstring required

Address will receive the output token

clipper_exchange_addressstring required

Blade contract address of the pool, is the address used when executing a transaction

calldatastring

Bytes representation of the swap function and parameters to be sent directly to the clipper_exchange_address for execution. Only present when calldata=true in request.

idstring uuid required

Internal identifier

input_value_in_usdnumber float required

Amount in dollars to be exchanged

output_value_in_usdnumber float required

Amount in dollars you will receive in the exchange

created_atinteger required

Unix Timestamp indicating the date and time when the quote was created

ratenumber float required

swap rate