Create Exchange (Quote)

Requesting an exchange is non binding, you can request as many exchanges as needed. Typically within your user experience tier, you are expected to poll this endpoint periodically when showing users quotes (e.g. every 3 seconds). When you are ready to accept a quote, see the accept exchange endpoint.

Note: Not all custodians support all order types. Where the order type is not possible (Quote/Market/Fix Destination/ Fix Source) an error will be returned.

SecurityOAuth2: OAuth2Flow
Request
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.

Request Body schema: application/json
source_account_id
required
string

Source account from which funds will be withdrawn

destination_account_id
required
string

Destination account where funds will be deposited

amount
required
number

The amount to be exchanged depending on the the action.

action
required
string

Type of exchange being performed.

  • 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"
description
string

(Optional) Description of the transaction

Responses
200

Success

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Error

post/v1/exchanges/quote
Request samples
application/json
{
  • "source_account_id": "string",
  • "destination_account_id": "string",
  • "amount": 0,
  • "action": "FIX_DESTINATION",
  • "description": "string"
}
Response samples
application/json
{
  • "data": {
    }
}
© 2024 Rail. All Rights Reserved.