Complete any trade

POST https://app-api.sandbox.coinify.com/trades/<id>/test/complete-trade

This endpoint will complete a newly created trade which is in the awaiting_transfer_in state.
Provide the ID of the trade in the <id> path parameter to complete the specific.

🚧

Note:

If the referenced trade is not in the awaiting_transfer_in state, or if the amount is not the same as the stated in the transfer, the endpoint will return a 500 Internal Error.

Example request:

{
  "details": {
    "account": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
  },
  "amount": 200.00, // Transfer out amount of the fake transaction
  "currency": "EUR" // Transfer out currency of the amount
}

Request object

The parameters in the request object are optional and are use to validate the trade if they are sent:

ParameterTypeDefaultDescription
amountFloat(Optional)Transfer out receive amount of the trade.
currencyString(Optional)Currency of the amount.
detailsMedium details(Optional)Information relevant for this medium

Details object

In the details object you must specify the account of the transfer out.

Response

This endpoint returns 204 No Content if the trade is completed successfully.

HTTP Response codeJSON data
204 No ContentSuccess, empty response.
400 Bad requestError interpreting the request.
500 Server errorError error has occurred parsing the data.