Get transactions
POST getTransactions
To identify transaction, use getTransactions
with the ID from the createTransaction/createFixTransaction response.
You can use getTransactions
method with other filters to improve user experience.
HTTP request
https://api.changelly.com/v2/#getTransactions
Request
- Request
- Payload
- cURL
Header parameters
Name | Type | Required | Description |
---|---|---|---|
X-Api-Key | string | true | Your API key (SHA256 from Public Key) |
X-Api-Signature | string | true | The query's serialized body signed by your private key according to the RSA-SHA256 method. |
Body parameters
Name | Type | Required | Description |
---|---|---|---|
jsonrpc | string | true | JSON-RPC version. |
id | string | true | Client's custom ID. |
method | string | true | API method name. |
params | object | true | Request parameters. |
params
object:
Name | Type | Required | Description |
---|---|---|---|
id | string or array of strings | false | Transaction ID. The maximum array length is 10. |
status | string or array of strings | false | Transaction status. |
currency | string or array of strings | false | Payin currency ticker (in lowercase). The maximum array length is 10. |
address | string or array of strings | false | Payin address. The maximum array length is 10. |
payoutAddress | string or array of strings | false | Payout address. The maximum array length is 10. |
extraId | string | false | Additional ID for address for currencies that use additional ID for transaction processing. |
since | integer | false | Unix timestamp in microseconds (16 digits). A filter that limits the results to records where the createdAt value is greater than or equal to the since value. |
limit | integer | false | Number of records to retrieve. The maximum limit is 100. By default, 10. |
offset | integer | false | Records cursor. |
Example 1
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "getTransactions",
"params": {
"currency": "xrp",
"address": "<<payin address to search>>",
"payoutAddress": "<<payout address to search>>",
"extraId": "<<payin extraId to search>>",
"limit": 10,
"offset": 10,
"since": 1483290569942384
}
}
Example 2
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "getTransactions",
"params": {
"id": "ahvt********dnfo"
}
}
Example 3
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "getTransactions",
"params": {
"id": [
"xln3********ms8im",
"tr4g3********zk4t4",
"484ec********pln5"
],
"currency": [
"xrp",
"eth"
],
"status": [
"finished",
"sending"
]
}
}
curl --location --request POST 'https://api.changelly.com/v2' \
--header 'X-Api-Key: {{apiKey}}' \
--header 'X-Api-Signature: {{sign}}' \
--data-raw '{
"jsonrpc": "2.0",
"id": "test",
"method": "getTransactions",
"params": {
"currency": "xrp",
"address": "<<payin address to search>>",
"extraId": "<<payin extraId to search>>",
"limit": 10,
"offset" : 10
}
}'
Response
- Example
- Success
- Errors
Sample response
Example 1
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": [
{
"id": "uzul********97b",
"createdAt": 1664897070000000,
"type": "fixed",
"moneyReceived": 1664897109000000,
"moneySent": 1664897441000000,
"rate": "14.41196637",
"payinConfirmations": "1",
"status": "finished",
"currencyFrom": "btc",
"currencyTo": "eth",
"payinAddress": "3Fi6v6s**************bLNkQPD",
"payinExtraId": null,
"payinExtraIdName": null,
"payinHash": "669d7d63*****************68e401c4c542",
"payoutHashLink": "https://etherscan.io/tx/0x66f72ac0dd*********************387c20a21",
"refundHashLink": null,
"amountExpectedFrom": "0.00422367",
"payoutAddress": "0x5Fb48bc0******************feE3Cf2a",
"payoutExtraId": null,
"payoutExtraIdName": null,
"payoutHash": "0x66f72ac0d***************************56387c20a21",
"refundHash": null,
"refundAddress": "bc1qxm9w***********************cz7atv5",
"refundExtraId": null,
"amountFrom": "0.00422367",
"amountTo": "0.06087139",
"amountExpectedTo": "0.06087139",
"networkFee": "0.00233395",
"exchangeFee": "0.4",
"apiExtraFee": "2.00",
"totalFee": "0.00233395",
"canPush": false,
"canRefund": false
},
{
"id": "ccud********os91",
"createdAt": 1664888443000000,
"type": "fixed",
"moneyReceived": 1664888456000000,
"moneySent": 1664889182000000,
"rate": "11.09727112",
"payinConfirmations": "2",
"status": "finished",
"currencyFrom": "xrp",
"currencyTo": "gala",
"payinAddress": "rUjd8QPJ**************vQC6dwe",
"payinExtraId": "93******79",
"payinExtraIdName": "Destination Tag",
"payinHash": "A67B08EE0C4***********************A7FDF7365333C",
"payoutHashLink": "https://etherscan.io/tx/0x5be5c44f11****************2befeb103e64a",
"refundHashLink": null,
"amountExpectedFrom": "10000",
"payoutAddress": "0x95c63a1******************3bd775d90",
"payoutExtraId": null,
"payoutExtraIdName": null,
"payoutHash": "0x5be5c44f1197d********************2befeb103e64a",
"refundHash": null,
"refundAddress": "rDaS8t8m***********JZxo9JKr",
"refundExtraId": null,
"amountFrom": "10000",
"amountTo": "110972.71124334",
"amountExpectedTo": "110972.71124334",
"networkFee": "105",
"exchangeFee": "0.5",
"apiExtraFee": "2.00",
"totalFee": "105",
"canPush": false,
"canRefund": false
}
]
}
Example 2
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": [
{
"id": "ldis********dnys",
"createdAt": 1617187096000000,
"type": "float",
"moneyReceived": 0,
"moneySent": 0,
"rate": "0.00021545",
"payinConfirmations": "0",
"status": "waiting",
"currencyFrom": "xlm",
"currencyTo": "eth",
"payinAddress": "GDX6FFZUVSYTOV****************HUXXPXYOUIOY6CDQXG4NP6OEQ7",
"payinExtraId": "9783********7653",
"payinExtraIdName": "Memo.ID",
"payinHash": null,
"payoutHashLink": null,
"refundHashLink": null,
"amountExpectedFrom": "500",
"payoutAddress": "0xCde3463364****************73d7f91136Ac34",
"payoutExtraId": null,
"payoutExtraIdName": null,
"payoutHash": null,
"refundHash": null,
"amountFrom": "",
"amountTo": "0",
"amountExpectedTo": "0.10746",
"networkFee": "0",
"apiExtraFee": "0.00",
"totalFee": null,
"canPush": false,
"canRefund": false
}
]
}
Response params
Name | Type | Description |
---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | Client's custom ID. |
result | array of objects | Result. |
result
schema:
Name | Type | Description |
---|---|---|
id | string | Transaction ID. Could be used in getStatus method. |
createdAt | integer | Time in timestamp format (microseconds) when the transaction was created. |
type | string | Type of transaction. Enum: float , fixed . |
moneyReceived | integer | The time in timestamp format (microseconds) of receiving the funds by Changelly. moneyReceived equals 0 if Changelly hasn't received the funds yet. |
moneySent | integer | The time in timestamp format (microseconds) of sending the funds to the user by Changelly. moneySent is not returned if Changelly hasn't sent the funds yet. |
rate | string | Current exchange rate. |
payinConfirmations | string | Number of confirmations. |
status | string | Transaction status. |
currencyTo | string | Payout currency ticker. |
currencyFrom | string | Payin currency ticker. |
payinAddress | string | Address for a user to send coins to. |
payinExtraId | string | Extra ID for payinAddress in case it is required. Note: If the payinExtraId parameter is returned in the response and is not null, it is required for user to send the funds to the payinAddress specifying extraId . Otherwise, the transactions will not be processed and the user will need to get a refund through technical support. |
payinExtraIdName | string | Name of the payin currency extra ID (if applicable). For example, "Destination Tag" for XRP. If extra ID is not applicable, the parameter is not returned. |
payinHash | string | Hash of the payin transaction. |
payoutAddress | string | Address where the exchange result will be sent to. |
payoutExtraId | string | Extra ID for payoutAddress in case it is required. |
payoutExtraIdName | string | Name of the payout currency extra ID (if applicable). For example, "Destination Tag" for XRP. If extra ID is not applicable, the parameter is not returned. |
payoutHash | string | Hash of the payout transaction. |
payoutHashLink | string | Explorer link to the payout transaction. |
refundAddress | string | Address of the wallet to refund in case of any technical issues during the exchange. The currency of the wallet must match with the from currency. |
refundExtraId | string | Extra ID for refundAddress . |
refundHash | string | Hash of the refund transaction. Note: If the refundHash parameter is null, it won't be returned in the response. |
refundHashLink | string | Explorer link to the refund transaction. Note: If the refundHashLink parameter is null, it won't be returned in the response. |
amountExpectedFrom | string | The amountFrom value from createTransaction request. |
amountExpectedTo | string | The amountTo value from getExchangeAmount response at the moment of createTransaction. This is the estimated payout amount of currency before withholding the network fee. |
amountFrom | string | The actual pay-in amount. |
amountTo | string | The actual amount that is sent to payoutAddress after processing the transaction. |
networkFee | string | Commission taken by the network from the amount sent to the user. Displayed in pay-out currency. |
exchangeFee | string | Changelly fee in percent. |
apiExtraFee | string | Your API extra fee in percent. |
totalFee | string | Total fee in pay-out currency. |
canPush | boolean | Is true if it's possible to push the transaction after it stops. |
canRefund | boolean | Is true if it's possible to refund the transaction after it stops. |
warning
The result schema parameter trackUrl
was deprecated on 06.01.2024.
Error schema
Name | Type | Description |
---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | Client's custom ID. |
error | object | Possible errors. |
»code | integer | Error code. |
»message | string | Error message. |
Error codes
Code | Message | Description |
---|---|---|
-32600 | Error: You reached requests limit {limit} rps | You have been sending more than 10 requests per second. |
-32603 | Internal Error or Error | Most likely, the problem is on our side. Further investigation is required. |