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
- Request
- cURL
Header parameters
Name | Type | Required | Description |
---|---|---|---|
X-Api-Key | string | true | Your public API key. |
X-Api-Signature | string | true | The query's serialized body signed by your private key according to the RSA-SHA256 method. |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
startDate | string | false | Start date for filtering orders in ISO format in UTC time zone. |
endDate | string | false | End date for filtering orders in ISO format in UTC time zone. |
orderId | array of strings | false | Array of order IDs that have been received in response POST /orders or /sell/orders in the orderID field. |
externalUserId | array of strings | false | Array of external user IDs that you have sent in request POST /orders or /sell/orders in the externalUserID field. |
externalOrderId | array of strings | false | Array of external order IDs that you have sent in request POST /orders or /sell/orders in the externalOrderId field. |
status | array of strings | false | Items Enum: created , pending , hold , refunded , expired , failed , complete .Array of order statuses. |
offset | number | false | Skip items to start. Minimum: 0. |
limit | number | false | Set the maximum number of items. The limit is from 1 to 100. |
curl --location --request GET
'https://fiat-api.changelly.com/v1/orders?startDate=2023-10-06T10:00:00.000Z&orderId[0]=71ahw34&orderId[1]=71ahw34&externalUserId=122hd&externalOrderId=71ahw34&status=created&offset=0&limit=30'
--header 'X-Api-Key: {{apiKey}}'
--header 'X-Api-Signature: {{signature}}'
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¤cyCode=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¤cy=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¤cyCode=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
Name | Type | Required | Description |
---|---|---|---|
orders | array of objects | true | Array of orders. |
total | integer | true | Total number of orders. |
limit | integer | true | Limit of orders per request. |
offset | integer | true | Offset for paginating orders. |
orders
item schema
Name | Type | Required | Description |
---|---|---|---|
redirectUrl | string | true | URL to the provider's purchase page. |
orderId | string | true | Internal order ID provided by Fiat API. |
externalUserId | string | true | User ID provided by you. |
externalOrderId | string | true | Order ID provided by you. |
type | string | true | Enum: buy /sell .Order type. |
providerCode | string | true | The On-Ramp or Off-Ramp provider code. Possible values. |
currencyFrom | string | true | Ticker of the pay-in currency in uppercase. |
currencyTo | string | true | Ticker of the payout currency in uppercase. |
amountFrom | string | true | Amount of currency the user is going to pay. |
country | string | true | Country ISO 3166-1 code (Alpha-2). |
state | string | true | State ISO 3166-2 code. Is required if provided country is US . |
ip | string | true | User's IP address. |
walletAddress | string | true | Recipient wallet address. |
walletExtraId | string | true | Property required for wallet addresses of currencies that use an additional ID for transaction processing (XRP, XLM, EOS, BNB). |
refundAddress | string | true | Recipient refund address. |
paymentMethod | string | true | The payment method code. Possible values |
userAgent | string | true | User Agent. |
metadata | object | true | Metadata object, which can contain any parameters you need. |
createdAt | date-time | true | Time in ISO 8601 format. |
status | string | true | Current status of the order. Enum: created /pending /hold /refunded /expired /failed /complete . |
payinAmount | string | true | Payin amount. |
payoutAmount | string | true | Estimated payout amount. |
payinCurrency | string | true | Ticker of the payin currency. |
payoutCurrency | string | true | Ticker of the payout currency. |
updatedAt | date-time | true | Time in ISO 8601 format. |
Error schema
Name | Type | Required | Description |
---|---|---|---|
errorType | string | true | Error type. |
errorMessage | string | true | Error message. |
errorDetails | array | true | If the error contains no details, errorDetails equals null. |
Possible error types:
Type | Description |
---|---|
validation | Validation error. |
errorDetails
item schema
Name | Type | Required | Description |
---|---|---|---|
cause | string | true | Error cause. For example, it can equal the missing request parameter for the validation error type. |
value | string | true | Error value. |
Error codes
Code | Message |
---|---|
400 | BadRequest |
401 | Unauthorized |
429 | TooManyRequests |
500 | InternalServerError |
- 400
- 401
- 429
- 500
BadRequest
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "providerCode",
"value": "Incorrect provider code"
}
]
}
Unauthorized
{
"errorType": "unauthorized",
"errorMessage": "Unauthorized",
"errorDetails": null
}
TooManyRequests
{
"errorType": "tooManyRequests",
"errorMessage": "Too many requests",
"errorDetails": null
}
InternalServerError
{
"errorType": "internalServerError",
"errorMessage": "Internal Server Error",
"errorDetails": null
}