Skip to main content

Create fixed rate transaction

POST createFixTransaction
info

The amountExpectedTo parameter value should be understood as a payout amount to the user before withholding the networkFee. To calculate the exact payout amount, deduct the networkFee value from amountExpectedTo

HTTP request

https://api.changelly.com/v2/#createFixTransaction

Request

Header parameters
NameTypeRequiredDescription
X-Api-KeystringtrueYour API key (SHA256 from Public Key)
X-Api-SignaturestringtrueThe query's serialized body signed by your private key according to the RSA-SHA256 method.

Body parameters

NameTypeRequiredDescription
jsonrpcstringtrueJSON-RPC version.
idstringtrueClient's custom ID.
methodstringtrueAPI method name.
paramsobjecttrueRequest parameters.
Important! Although amountFrom and amountTo are optional parameters, it is required to set one of them. If you provide none or both, the request will result in error.

params object:

NameTypeRequiredDescription
fromstringtruePayin currency code (in lowercase).
tostringtruePayout currency code (in lowercase).
rateIdstringtrueRate ID that you get from getFixRate/getFixRateForAmount requests.
addressstringtrueRecipient address.
amountFromstringfalseAmount of currency that user is going to send.
amountTostringfalseAmount user wants to receive.
extraIdstringfalseAdditional ID for address for currencies that use additional ID for transaction processing.
refundAddressstringtrueAddress 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.
refundExtraIdstringfalseextraId for refundAddress.
fromAddressstringfalseAddress of the wallet from which the user will send payin.
fromExtraIdstringfalseextraId for fromAddress.

| userMetadata | string | false | Escaped JSON.
You can use userMetadata to include any additional parameters for customization purposes.
To use this feature, please contact us at [email protected]. |

Response

Sample response

application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": {
"id": "149a****m90",
"type": "fixed",
"status": "new",
"payTill": "2022-10-31T16:41:55.000000271+00:00",
"currencyFrom": "btc",
"currencyTo": "eth",
"payinExtraId": null,
"payoutExtraId": null,
"refundAddress": "1Bvjij5653y9r********QBPzTZpb",
"amountExpectedFrom": "1.00000000",
"amountExpectedTo": "32.277489930000000000",
"payinAddress": "3EkyEjzs********vZ95AyTM",
"payoutAddress": "0xeee031413*******B8Cf5E3DFc214",
"createdAt": 1664894262000000,
"networkFee": "0.000515"
}
}