# Accept Exchange Accept an exchange quote. This will execute the exchange and is not reversible Endpoint: POST /v1/exchanges/{exchange_id}/accept Version: 1.1.2 Security: OAuth2Flow ## Path parameters: - `id` (string, required) Exchange ID ## Header parameters: - `Authorization` (string) OAuth bearer token (see authentication flows) - `x-l2f-request-id` (string) Optional Unique ID per request, useful for fault resolution/diagnosis and audit. - `x-l2f-idempotency-id` (string) Unique ID used to safely retry an operation. See idempotency section for more details. - `x-signature` (string) Client signature to validate the provence of the API request. See signing section for more details. - `x-timestamp` (string) Current timestamp, represented AS unix epoch seconds. Mandatory when x-signature is provided. ## Request fields (application/json): - `maximum_slippage` (number) Default value: 0.01 The maximum slippage rail will consider when accepting this order. Defined in bps and represented as a percentage. So 10bps would be presented as 0.001. Must be greater than or equal to 0. We calculate slippage based on the quote you are accepting. While the slippage may not always be used, it is there to ensure a better completion/fill rate with our market makers. Where the quote cannot be fulfilled within the slippage tolerance, the exchange response status will be CANCELLED. ## Response 200 fields (application/json): - `data` (object, required) - `data.id` (string, required) Unique ID of the exchange request - `data.status` (string, required) Status of the Exchange. Cannot be modified directly by the client. * REQUESTED - Exchange request is created and has passed validation. It must be accepted at which point it will be executed. * ACCEPTED - Exchange request has been accepted and is waiting execution. At this point it cannot be cancelled. * EXPIRED - Occurs when an exchange request was not accepted within a reasonable time frame. The exchange cannot be replayed from this state. * CANCELLED - Exchange request was cancelled. Only available prior to acceptance. The exchange request cannot be replayed from this state. * EXECUTED - Exchange request has been executed, it is completed with all ledger entries performed. * REJECTED - Exchange request was rejected and cannot be executed. Enum: "REQUESTED", "ACCEPTED", "EXPIRED", "CANCELLED", "EXECUTED", "REJECTED" - `data.created_timestamp` (string, required) Time when the exchange request was generated - `data.exchange_type` (string, required) The type of exchange being performed. Enum: "MARKET", "QUOTE" - `data.action` (string, required) The action defines which side of the exchange to fix. * FIX_DESTINATION - This fixes the amount to credit to the DESTINATION account, therefore the quote provided is for how much to deduct from the SOURCE account. Think of this as 'buying' the destination amount. * FIX_SOURCE - This fixes the amount you want to debit from the SOURCE account, therefore the quote provided is for how much would be credited to the DESTINATION account. Think of this as 'selling' the source amount. Enum: "FIX_DESTINATION", "FIX_SOURCE" - `data.source_details` (object, required) Details of transaction to be performed on the source account on acceptance - `data.source_details.source_account_id` (string, required) Source account ID - `data.source_details.asset_type_id` (string) Asset type IDs follow a simple structure as follows: {$BLOCKCHAIN}_{$NETWORK}_{$CURRENCY_CODE} Simple asset type to test with include. - ETHEREUM_SEPOLIA_ETH - ETHEREUM_SEPOLIA_USDC - SOLANA_DEVNET_SOL - BITCOIN_TESTNET_BTC - FIAT_TESTNET_USD - FIAT_TESTNET_USD - FIAT_MAINNET_USD - FIAT_TESTNET_EUR - `data.source_details.amount_to_debit` (number, required) Amount that will be debited from the source account - `data.destination_details` (object, required) Details of transaction to be performed on the destination account on acceptance - `data.destination_details.destination_account_id` (string, required) Destination account ID - `data.destination_details.asset_type_id` (string) Asset type IDs follow a simple structure as follows: {$BLOCKCHAIN}_{$NETWORK}_{$CURRENCY_CODE} Simple asset type to test with include - ETHEREUM_SEPOLIA_ETH - ETHEREUM_SEPOLIA_USDC - SOLANA_DEVNET_SOL - BITCOIN_TESTNET_BTC - FIAT_TESTNET_USD - FIAT_TESTNET_USD - FIAT_MAINNET_USD - FIAT_TESTNET_EUR - `data.destination_details.amount_to_credit` (number, required) Amount that will be credited to the destination account ## Response 400 fields (application/json): - `errors` (array) Error List - `errors.code` (string) Layer2 Standard Error Code - `errors.description` (string) Error Description ## Response 401 fields (application/json): - `errors` (array) Error List - `errors.code` (string) Layer2 Standard Error Code - `errors.description` (string) Error Description ## Response 404 fields (application/json): - `errors` (array) Error List - `errors.code` (string) Layer2 Standard Error Code - `errors.description` (string) Error Description ## Response 500 fields (application/json): - `errors` (array) Error List - `errors.code` (string) Layer2 Standard Error Code - `errors.description` (string) Error Description