Orders
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.
POST
/rest/orders
Authorization*
curl --request POST \
--url https://api-test.koywe.com/rest/orders \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"destinationAddress": "0x40f9bf922c23c43acdad71Ab4425280C0ffBD697"
}'
{
"status": "200",
"example": {
"amountIn": 1313696,
"amountOut": 1,
"documentNumber": "158289164",
"email": "kenneth@koywe.com",
"orderId": "3ae57c43-6fae-4b0c-b0d5-2c35759e76d9",
"paymentMethodId": "63473a5f743da0f55fa04c8f",
"providedAction": "url.example.com",
"quoteId": "63e154dbc47d9176668a9af6",
"symbolIn": "CLP",
"symbolOut": "ETH"
}
}
Authorizations
Authorizationheaderrequired
string
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
amountIn
number
amountOut
number
destinationAddressrequired
string
documentNumber
string
email
string
metadata
string
paymentMethodId
string
quoteId
string
symbolIn
string
symbolOut
string
Response
200 - application/json
amountIn
number
amountOut
number
documentNumber
string
email
string
orderId
string
paymentMethodId
string
providedAction
string
quoteId
string
symbolIn
string
symbolOut
string
curl --request POST \
--url https://api-test.koywe.com/rest/orders \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"destinationAddress": "0x40f9bf922c23c43acdad71Ab4425280C0ffBD697"
}'
{
"status": "200",
"example": {
"amountIn": 1313696,
"amountOut": 1,
"documentNumber": "158289164",
"email": "kenneth@koywe.com",
"orderId": "3ae57c43-6fae-4b0c-b0d5-2c35759e76d9",
"paymentMethodId": "63473a5f743da0f55fa04c8f",
"providedAction": "url.example.com",
"quoteId": "63e154dbc47d9176668a9af6",
"symbolIn": "CLP",
"symbolOut": "ETH"
}
}