Create buy order
Endpoint for creating buy order for crypto
POST
https://papi.swapin.com/api/buy
Request Body
{
"ok": true,
"exchange_order": {
"order_id": "BBHT7HQ-EO-TNRASHV-3WZPETI",
"account_id": "ABZBLRQ-4L05DEL",
"user_id": "123",
"status": "W",
"status_text": "Waiting funds",
"deposit_order_id": "BBHT7HQ-DO-5AVBLHZ-28QMPMR",
"from_coin": "EUR",
"from_account_id": "ABZBLRQ-4L05DEL",
"from_amount": 100,
"from_amount_indicative": 100,
"to_coin": "BTC",
"to_coin_address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
"to_amount": null,
"to_amount_indicative": 0.00295642,
"rate_target": null,
"booked_amount": null,
"fee_amount": 21,
"fee_coin": "EUR",
"network_fee_amount": 4.56,
"network_fee_coin": "EUR",
"created_time": "2023-06-02 11:22:38 +00:00",
"created_utime": 1685704958,
"status_time": "2023-06-02 11:22:38 +00:00",
"status_utime": 1685704958,
"trade_time": null,
"trade_utime": null,
"completed_time": null,
"completed_utime": null,
"cancelled_reason": null
}
}
{
"message": "Please login"
}
{
"message": "No access to make orders yet"
}
{
"message": "The given data was invalid.",
"errors": {
"from_currency": [
"The field is required."
],
"from_amount": [
"The field is required."
]
}
}
Last updated