Skip to main content

Get orders by a partner key

GET /v1/orders

List of orders for a specific partner key.

All parameters are optional filters for the list of orders that will be returned. We recommend specifying as many filters as possible. If you do not specify query parameters, the method returns a full list of orders.

HTTP request

https://fiat-api.changelly.com/v1/orders

Request

Header parameters

NameTypeRequiredDescription
X-Api-KeystringtrueYour public API key.
X-Api-SignaturestringtrueThe query's serialized body signed by your private key according to the RSA-SHA256 method.

Query parameters

NameTypeRequiredDescription
startDatestringfalseStart date for filtering orders in ISO format in UTC time zone.
endDatestringfalseEnd date for filtering orders in ISO format in UTC time zone.
orderIdarray of stringsfalseArray of order IDs that have been received in response POST /orders or /sell/orders in the orderID field.
externalUserIdarray of stringsfalseArray of external user IDs that you have sent in request POST /orders or /sell/orders in the externalUserID field.
externalOrderIdarray of stringsfalseArray of external order IDs that you have sent in request POST /orders or /sell/orders in the externalOrderId field.
statusarray of stringsfalseItems Enum: created, pending, hold, refunded, expired, failed, complete.
Array of order statuses.
offsetnumberfalseSkip items to start. Minimum: 0.
limitnumberfalseSet the maximum number of items. The limit is from 1 to 100.

Response

Sample response

note

If any of the parameters are not provided, they will be returned with the null value.

application/json
[
{
"orders": [
{
"redirectUrl": "https://changelly.moonpay.io/?apiKey=pk_test_PvpHyEyDEjlkkB71nLOk3XqEaC4Wpq&defaultCurrencyCode=xrp&baseCurrencyCode=usd&currencyCode=xrp&baseCurrencyAmount=150&externalTransactionId=a5e8a5db-ad2f-49ad-9aca-33b49de52c71&platform=fiat_api&walletAddress=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&walletAddressTag=12345&signature=V%2FjtbTO11tCqmsLcW5hyJOw1BsEMBxVd2fiDFs5reg8%3D",
"orderId": "915c1b52-4b0c-40b7-8c35-a49c0891bf96",
"externalUserId": "122hd",
"externalOrderId": "71ahw34",
"providerCode": "moonpay",
"currencyFrom": "USD",
"currencyTo": "XRP",
"amountFrom": 150,
"country": "FR",
"state": null,
"ip": "192.1.1.2/32",
"walletAddress": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
"walletExtraId": 12345,
"paymentMethod": "card",
"userAgent": "",
"metadata": {},
"createdAt": "2023-10-25T06:26:27.770Z",
"status": "created",
"payinAmount": null,
"payoutAmount": null,
"payinCurrency": null,
"payoutCurrency": null,
"updatedAt": "2023-10-25T06:26:27.770Z"
},
{
"redirectUrl": "https://sandbox.wert.io/01GMTBAYJ3T4NQ27XRSVFQJY6K/redirect/login?currency_amount=150&currency=USD&address=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&click_id=f13e23ee-2621-4f0f-9c35-1eb6cb5ddeef",
"orderId": "9ca41d6f-8fe8-457e-823c-e33a7e91dd49",
"externalUserId": "122hd",
"externalOrderId": "71ahw34",
"providerCode": "wert",
"currencyFrom": "USD",
"currencyTo": "XRP",
"amountFrom": 150,
"country": "FR",
"state": null,
"ip": "192.1.1.2/32",
"walletAddress": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
"walletExtraId": 12345,
"paymentMethod": "card",
"userAgent": "",
"metadata": {},
"createdAt": "2023-11-07T11:38:51.374Z",
"status": "created",
"payinAmount": null,
"payoutAmount": null,
"payinCurrency": null,
"payoutCurrency": null,
"updatedAt": "2023-11-07T11:38:51.374Z"
},
{
"redirectUrl": "https://changelly.moonpay.io/?apiKey=pk_test_PvpHyEyDEjlkkB71nLOk3XqEaC4Wpq&defaultCurrencyCode=xrp&baseCurrencyCode=usd&currencyCode=xrp&baseCurrencyAmount=150&externalTransactionId=c46c8f37-5199-4ed9-938f-0f40e58152ee&platform=fiat_api&walletAddress=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&walletAddressTag=12345&signature=9IALu%2Faz2GDZ4XWoEa7zdJVb0lilWNI82umfZam%2B440%3D",
"orderId": "e4455be6-a438-4d81-b62d-b9fb1cacd967",
"externalUserId": "122hd",
"externalOrderId": "71ahw34",
"providerCode": "moonpay",
"currencyFrom": "USD",
"currencyTo": "XRP",
"amountFrom": 150,
"country": "FR",
"state": null,
"ip": "192.1.1.2/32",
"walletAddress": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
"walletExtraId": 12345,
"paymentMethod": "card",
"userAgent": "",
"metadata": {},
"createdAt": "2023-11-13T05:28:45.522Z",
"status": "created",
"payinAmount": null,
"payoutAmount": null,
"payinCurrency": null,
"payoutCurrency": null,
"updatedAt": "2023-11-13T05:28:45.522Z"
}
],
"total": 3,
"limit": 30,
"offset": 0
}
]

Response params

NameTypeRequiredDescription
ordersarray of objectstrueArray of orders.
totalintegertrueTotal number of orders.
limitintegertrueLimit of orders per request.
offsetintegertrueOffset for paginating orders.

orders item schema

NameTypeRequiredDescription
redirectUrlstringtrueURL to the provider's purchase page.
orderIdstringtrueInternal order ID provided by Fiat API.
externalUserIdstringtrueUser ID provided by you.
externalOrderIdstringtrueOrder ID provided by you.
typestringtrueEnum: buy/sell.
Order type.
providerCodestringtrueThe On-Ramp or Off-Ramp provider code. Possible values.
currencyFromstringtrueTicker of the pay-in currency in uppercase.
currencyTostringtrueTicker of the payout currency in uppercase.
amountFromstringtrueAmount of currency the user is going to pay.
countrystringtrueCountry ISO 3166-1 code (Alpha-2).
statestringtrueState ISO 3166-2 code. Is required if provided country is US.
ipstringtrueUser's IP address.
walletAddressstringtrueRecipient wallet address.
walletExtraIdstringtrueProperty required for wallet addresses of currencies that use an additional ID for transaction processing (XRP, XLM, EOS, BNB).
refundAddressstringtrueRecipient refund address.
paymentMethodstringtrueThe payment method code. Possible values
userAgentstringtrueUser Agent.
metadataobjecttrueMetadata object, which can contain any parameters you need.
createdAtdate-timetrueTime in ISO 8601 format.
statusstringtrueCurrent status of the order.
Enum: created/pending/hold/refunded/expired/failed/complete.
payinAmountstringtruePayin amount.
payoutAmountstringtrueEstimated payout amount.
payinCurrencystringtrueTicker of the payin currency.
payoutCurrencystringtrueTicker of the payout currency.
updatedAtdate-timetrueTime in ISO 8601 format.

Error schema

NameTypeRequiredDescription
errorTypestringtrueError type.
errorMessagestringtrueError message.
errorDetailsarraytrueIf the error contains no details, errorDetails equals null.

Possible error types:

TypeDescription
validationValidation error.

errorDetails item schema

NameTypeRequiredDescription
causestringtrueError cause. For example, it can equal the missing request parameter for the validation error type.
valuestringtrueError value.

Error codes

CodeMessage
400BadRequest
401Unauthorized
429TooManyRequests
500InternalServerError
BadRequest
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "providerCode",
"value": "Incorrect provider code"
}
]
}