Status | Description |
| Information is required. Must be specified through |
| All information for the settlement has been received. Waiting for the other settlement to be |
| Waiting for the user to take some action not related to the API (eg initiate a blockchain transfer for funding) |
| Waiting for some external process. |
| Waiting for some internal process. |
| Settlement is complete |
| Some error has occoured and the transaction has started in some way (ie funds are locked). |
| Some error has occoured or the transaction has timed out and no funds are locked. |
In the general case, each settlement has four steps, allowing the API to accommodate a wide variety of methods.
direction
.
As a shortcut, method can be supplied when initiating the /intent_to_trade
request.
POST /api/v1/settlement/method{"transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364","method": "BLOCKCHAIN_TRANSFER","direction": "PAYOUT","input_parameters": {"account_key": {"type": "WALLET_ADDRESS","value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"}}}RESPONSE 202{"success": true,"payload": {"settlement_instruction_id": "1cfbbd0b-3ddc-40b6-9676-3cf91ea6949c","transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364","currency": "BTC","direction": "PAYOUT","method": "BLOCKCHAIN_TRANSFER","status": "WAITING_EXTERNAL","quantity": "0.008","required_input": {"account_key": {"type": "WALLET_ADDRESS","label": "Wallet Address","required": true,"validation": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$"}},"expires": {"unix_ms": 1583138106331,"iso8601": "2020-03-02T08:35:06.331Z","ttl_ms": 20000}}}
POST /api/v1/settlement/parameters{"settlement_instruction_id": "4e18c3eb-2039-4441-a033-16cfec8ec058","input_parameters": {"account_key": {"type": "WALLET_ADDRESS","value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"}}}RESPONSE 202{"success": true,"payload": {"settlement_instruction_id": "4e18c3eb-2039-4441-a033-16cfec8ec058","transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364","currency": "BTC","direction": "PAYOUT","method": "BLOCKCHAIN_TRANSFER","status": "WAITING_EXTERNAL","quantity": "0.008","received_input": {"account_key": {"type": "WALLET_ADDRESS","value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"}},"expires": {"unix_ms": 1583138106331,"iso8601": "2020-03-02T08:35:06.331Z","ttl_ms": 20000}}}
For settlement methods where no setup parameters are provided by the server, input parameters and can be optionally supplied when specifying the settlement method.
/intent_to_trade
endpoints where there are no setup parameters.
POST /api/v1/settlement/method{"transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364","method": "BLOCKCHAIN_TRANSFER","direction": "PAYOUT","input_parameters": {"account_key": {"type": "WALLET_ADDRESS","value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"}}}RESPONSE 201{"success": true,"payload": {"settlement_instruction_id": "1cfbbd0b-3ddc-40b6-9676-3cf91ea6949c","transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364","currency": "BCH","direction": "FUNDING","method": "BLOCKCHAIN_TRANSFER","status": "WAITING_EXTERNAL","quantity": "0.023470","received_input": {"account_key": {"type": "WALLET_ADDRESS","value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"}},"expires": {"unix_ms": 1583138106331,"iso8601": "2020-03-02T08:35:06.331Z","ttl_ms": 20000}}}