Accept Exchange

Accept an exchange quote. This will execute the exchange and is not reversible

SecurityOAuth2: OAuth2Flow
Request
path Parameters
id
required
string

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 Body schema: application/json
maximum_slippage
required
number

The maximum slippage Layer2 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 REJECTED.

Responses
200

Success

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Error

post/v1/exchanges/{id}/accept
Request samples
application/json
{
  • "maximum_slippage": 0
}
Response samples
application/json
{
  • "data": {
    }
}
© 2023 Layer2 Financial Inc. All Rights Reserved.