v1

latestOpenAPI 3.0.02026-08-0451764.0 KB
Quote

Sign a quote for swap execution

This endpoint plays a pivotal role in the preparation and execution of secure asset swaps on the blockchain. By providing a Quote ID and a destination address, users can initiate the signing process, resulting in the generation of the essential signature and transaction data. This signature and data package, in turn, is integral for ensuring the validity and security of asset transfers within the blockchain network.

post/rfq/sign

Request body

quote_idstring uuid required

The id of the quote returned in quote endpoint

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.

native_inputboolean

If the input token is native (e.g. raw ETH), this value must be true. This will use the sellEthForToken contract function and will take the msg.value for the input. e.g ETH -> USDC. This field is mutually exclusive with native_output.

native_outputboolean

If the output token is native (i.e. raw ETH), this value must be true. This will use the sellTokenForEth contract function. e.g USDC -> ETH. This field is mutually exclusive with native_input.

Example request

{
  "quote_id": "4c707e45-7019-4b81-b875-c5eb6fe061d6",
  "destination_address": "0x960376b3F62f41E7e66809a05D1C5afdFD60A0E9",
  "sender_address": "0x960376b3F62f41E7e66809a05D1C5afdFD60A0E9",
  "aux_data": "0x31494e4348000000000000000000000000000000000000000000000000000000"
}

Response

Quote signed 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.