Creates a new order
Creates a purchase or sell order, returns a UUID for tracking and, depending on the payment method, an URL to do so. For authenticated calls that do not have an email asociated, one must be included as a parameter to link the transaction to a specific user. If quoteId is provided and quote is still valid, symbolIn, symbolOut, amountIn, amountOut, and paymentMethodId are nullable. In the case of amountIn and amountOut, only one must be passed as an input parameter.
IMPORTANT: As of November 6, 2023, This endpoint requires the quote ID,
you can get an ID from:
- POST /quote
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
This is a required attribute when creating an order. Its content varies depending on the type of order: for an 'off-ramp' order, destinationAddress
should contain the identifier of the bank account (BankAccount); for an 'on-ramp' order, it should be the destination address for the cryptocurrencies. This attribute is crucial in ensuring that funds are sent to the correct place.
This is an optional attribute that you can use to store any additional information you need to associate with the order. This information will be stored with the order details and can come in handy for keeping track of customer-specific data, order features, or other relevant information not covered in other attributes of the order.
This attribute is employed to provide idempotency in the order creation requests. It is a unique identifier per order, supplied from the client side, that allows for a unique identification of an order and prevents the duplicate processing of the same order. By incorporating an externalId
, clients have the ability to safely retry requests without the fear of inadvertently carrying out repeated transactions.
This is an optional attribute that can be provided when creating an order. If supplied, this value will be returned in the 'providedAction' attribute of the response upon the creation of the order. The primary purpose is to allow the client to redirect users to a specific URL following the order creation. If no callbackUrl
is provided, the system will generate and return a default URL, reflected in the 'providedAction' attribute, that points to a specific interface of Koywe.