post https://api-pro.sim.hashkeydev.com/api/v1/convertCurrency/transact
Place an order for currency conversion
Weight: 1 time / second
Request Parameters
PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
---|---|---|---|---|
quoteId | STRING | Y | 8f92785969df4683a4a688cd8b9f9533 | A unique reference ID for this quote. Generated from the response via getQuote endpoint. |
clientOrderId | STRING | 122455 | An ID defined by the client for the order; it will be automatically generated if not sent in the request. | |
buyCurrency | STRING | Y | HKD | The currency which the client wants to buy. |
sellCurrency | STRING | Y | USD | The currency which the client wants to sell. |
buyAmount | DECIMAL | Conditional | 1000 | The amount which the client wants to buy from the bank in buyCurrency. Only one amount out of buyAmount & sellAmount should be specified. |
sellAmount | DECIMAL | Conditional | - | The amount which the client wants to sell to the bank in sellCurrency. Only one amount out of buyAmount & sellAmount should be specified. |
Response Content
PARAMETER | TYPE | Example values | DESCRIPTION |
---|---|---|---|
accountId | LONG | 1644290379632090370 | Account number |
quoteId | STRING | 8f92785969df4683a4a688cd8b9f9533 | A unique reference ID for this quote |
clientOrderId | STRING | 122455 | An ID defined by the client for the order; it will be automatically generated if not sent in the request |
orderId | STRING | FX624613599962509312 | The orderId generated by HashKey |
status | STRING | IN_PROGRESS | Status of transaction |
buyCurrency | STRING | HKD | Currency to buy |
sellCurrency | STRING | USD | Currency to sell |
buyAmount | DECIMAL | 1000 | The amount which the client wants to buy from the bank in buyCurrency. Only one amount out of buyAmount & sellAmount should be specified |
sellAmount | DECIMAL | 128.126000 | The amount which the client wants to sell to the bank in sellCurrency. Only one amount out of buyAmount & sellAmount should be specified |
rate | DECIMAL | 0.128126 | Indicative rate |
transactTime | LONG | 1726727487548 | Timestamp in milliseconds |