Initiate new On-chain Trade Transaction

Initiate a new on-chain transaction to trade assets.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required
Body Params
string
required

Unique ID to ensure idempotency

string
required

Code of asset to sell

string
required
^-?[0-9]+(\.[0-9]+)?$

The total amount to be sold

string
required

Code of asset to buy

string | null

Optional quote ID, does market order if not provided

string | null
^-?[0-9]+(\.[0-9]+)?$

Optional fee to pay treasury in from_asset_code for network fee

string | null

Optional memo to attach to transaction.

Responses

400

Possible reasons:

  • amount must be positive
  • amount must not be negative
  • transaction with this external_id was already attempted
  • unknown from asset_code
  • unknown to asset_code
401

Not authenticated

403

the authority account cannot be used as the account for a transaction

404

Not found

409

user is archived

422

The request body is valid JSON but does not match the expected schema.

500

Possible reasons:

  • attempt to verify existing contract failed
  • could not begin transactional query
  • failed to build contract
  • failed to commit database transaction
  • failed to create transaction
  • failed to get asset code
  • failed to get treasury user
  • failed to save contract
  • treasury user is not configured
Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json