Create buy order

Endpoint for creating buy order for crypto

POST https://papi.swapin.com/api/buy

Request Body

Name
Type
Description

from_amount*

Decimal

Total sum of payment in EUR

to_coin*

String

Coin symbol

from_currency*

String

EUR

to_coin_address*

String

deposit_method*

String

SEPA_BANK_TRANSFER|BALANCE

client_reference

String(50)

Reference to order in Partner system

receiver_name

String

Fullname of the receiver

receiver_external_id

String

ID of the receiver in partner system

jwt

String

JWT token with order details and signature. Required if deposit method "BALANCE" is used.

JWT Body

{
    "from_currency":"EUR",
    "from_amount":93.05, 
    "to_coin": "BTC", 
    "to_coin_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
    "receiver_external_id": "123456",
    "deposit_method": "BALANCE",
    "receiver_name": "John Doe",
    "client_reference": "65648e86-c890-444c-8549-ad44c961280b",
    "iat": 1761678857,
    "exp": 1761682457
}

Use JWT signing algorithm RS256. Unique client_reference is required! "iat" must be in the past but not more than 30min. Max "exp" is "iat" + 30min. We recommend "exp" to be "iat" + 5min.

Last updated