Skip to main content

Using PIX

Buy cryptocurrencies using PIX as payment.

To perform a SWAP or purchase cryptocurrencies using PIX, you need to make a POST request with the following configuration:

URL

https://api.bembit.com/api/v1/orders/swap/fiat-to-crypto

Method

POST

Params

Important!

The parameters for this request should be passed to the endpoint via headers, along with the request body at the time of the request.

ParamsTypeDefault valuesDescription
apistringundefinedYour API.
secretstringundefinedYour Secret.

cURL

curl -X 'POST' \
'https://api.bembit.com/api/v1/orders/swap/fiat-to-crypto' \
-H 'accept: */*' \
-H 'api: {Your API}' \
-H 'secret: {Your secret}' \
-H 'Content-Type: application/json' \
-d '{
"amount": 1,
"recipient": {
"tokenToReceive": "string",
"walletToReceive": "string",
"network": integer,
}
}'

Request Body:

{
"amount": 1000,
"recipient": {
"tokenToReceive": "string",
"walletToReceive": "string",
"network": 0
}
}
  • amount: Swap value.
  • recipient / tokenToReceive: Symbol of the token being purchased.
  • recipient / walletToReceive: Address of the wallet where the token will be sent upon completing the operation.
  • recipient / network: Identification number of the blockchain where the token being purchased is located.

Server Responses:

Status 200:

Success

Status 403:

Unauthorized

Status 404:

Unable to do swap

See and test our API on Swagger.