Documentation/API Reference

API REFERENCE

Query an FX order

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Query an FX order

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters2

Required fields first

Query an FX order

trade_idRequiredstringdata.trade_idQuote ID
request_idRequiredstringdata.request_idUnique request ID; a combination of digits and letters at least 24 characters is recommended

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

This API queries FX order information.

After an FX order has been created and executed, use this API to query its latest status, execution information, and related transaction details.

Please use a dedicated account.

user=040268

ParameterTypeDescriptionRequired
userStringMerchant-level UIDRequired
signStringSignatureRequired
methodStringv3.QueryFXOrderRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
trade_idStringQuote IDRequired
request_idStringUnique request ID; a combination of at least 24 digits and letters is recommendedRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"method=v3.QueryFXOrder&request_id=20304095064069023960369q-11&time=1546588959&trade_id=6e5cf660fb58455cd68a413a8249061a&user=040268"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
  "user": "040268",
  "sign": "YOUR_SIGNATURE",
  "method": "v3.QueryFXOrder",
  "time": 1546588959,
  "data": {
    "trade_id": "6e5cf660fb58455cd68a413a8249061a",
    "request_id": "20304095064069023960369q-11"
  }
}

Response example:

{
  "status": true,
  "code": "200",
  "data": {
    "booking_status": "success",
    "settlement_status": "settled",
    "sell_currency": "GBP",
    "buy_currency": "DKK",
    "sold_currency": "GBP",
    "sold_amount": "1.00",
    "bought_currency": "DKK",
    "bought_amount": "8.54",
    "tenor": "TOD",
    "exchange_rate": "8.544924729",
    "order_id": "YOUR_ORDER_ID",
    "quote_id": "83e96dc0-8f8e-48c7-9bc4-6acc1019fced",
    "trade_id": "6e5cf660fb58455cd68a413a8249061a",
    "reference": "YB test"
  },
  "message": "",
  "response_id": "202603181711118835985708"
}

Additional information:

Response result:
  1. If the call succeeds, "status": true is returned.
  2. If the call fails, "status": false is returned.
Response codes:
StatusCodeMessage
true200
false-1000Internal error
false-403The signature Error
false-2001The user not exist
false-3001Required field is missing
false-4118Incorrect request ID
booking_status
StatusDescription
successThe FX booking request was successfully processed and the order has been created or executed.
failedThe request failed due to an internal system error. Please retry later or contact technical support if the issue persists.
pendingThe request is pending because the request signature verification failed. Please verify the signature parameters and try again.
reversedThe request could not be processed because the specified user does not exist in the system.
rolledThe request was rejected because one or more required fields are missing in the request parameters.
updatedThe request ID provided is incorrect or does not match any existing transaction.
settlement_status:
StatusDescription
openThe FX order has been successfully created and is awaiting settlement.
settledThe FX transaction has been fully settled and the funds have been delivered according to the agreed tenor.
pendingThe FX order has been created but settlement has not yet been completed. This may occur while waiting for the settlement date (e.g., SPOT T+2).
cancelledThe FX order has been cancelled and will not be settled.