The Trade API allows you to book foreign exchange (FX) trades using a valid quoteId. Upon successful booking, you will receive a trade confirmation with details such as currencies, amounts, rates, fees, and a unique fxId for future reference.

Request

To book an FX trade, send a POST request with a valid quoteId in the request body.

Request Body:

  • Required Fields:
    • quoteId: The unique identifier for the quote you wish to book.

{
"quoteId": "9165eeca-beef-4973-b3b9-7f244a300c5f"
}

Response

A successful response will include details about the booked trade.


{
    "message": "",
    "errorCode": "",
    "isSuccess": true,
    "buyAmount": 8262.75,
    "sellAmount": 1500,
    "buyCurrency": "BRL",
    "sellCurrency": "USD",
    "tradeStatus": "PENDING",
    "rate": 5.5085,
    "tradeDate": "2024-09-04",
    "quoteId": "9165eeca-beef-4973-b3b9-7f244a300c5f",
    "fxId": 4709623
}

Fields:

  • message: Any additional message related to the trade.
  • errorCode: Error code if the request was not successful.
  • isSuccess: Indicates whether the trade booking was successful (true or false).
  • buyAmount: The amount of the buy currency.
  • sellAmount: The amount of the sell currency.
  • buyCurrency: ISO currency code for the buy currency.
  • sellCurrency: ISO currency code for the sell currency.
  • tradeStatus: The current status of the trade (e.g., PENDING).
  • rate: The rate applied to the trade.
  • tradeDate: The date when the trade was booked.
  • quoteId: contains the quoteId used for booking.
  • fxId: StoneX's unique identifier for the booked trade, used for future reference.

Usage

  • Prepare Request: Include a valid quoteId in the request body.
  • Send Request: Make a POST request to the trade booking endpoint.
  • Track Trade: Use the fxId from the response to track the status of the booked trade.

Notes

  • Quote Validity: Ensure the quoteId is valid and has not expired.
  • Trade Status: Use the Trade Status endpoint to monitor your payment status after booking the trade.
Language
URL
Click Try It! to start a request and see the response here!