Simular taxa
curl --request POST \
--url https://sandbox.brlp.io/api/v1/partners/me/fees/simulate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<unknown>",
"assetId": "<unknown>"
}
'import requests
url = "https://sandbox.brlp.io/api/v1/partners/me/fees/simulate"
payload = {
"amount": "<unknown>",
"assetId": "<unknown>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<unknown>', assetId: '<unknown>'})
};
fetch('https://sandbox.brlp.io/api/v1/partners/me/fees/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.brlp.io/api/v1/partners/me/fees/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<unknown>',
'assetId' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.brlp.io/api/v1/partners/me/fees/simulate"
payload := strings.NewReader("{\n \"amount\": \"<unknown>\",\n \"assetId\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.brlp.io/api/v1/partners/me/fees/simulate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<unknown>\",\n \"assetId\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.brlp.io/api/v1/partners/me/fees/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<unknown>\",\n \"assetId\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_bodyAutorizações
Bearer API key (recommended). Format: Bearer sk_live_<hex>. Send the key directly - no signature, nonce or timestamp. Create/revoke keys in the dashboard or via /partners/me/api-keys. Accepted on the same routes as the HMAC scheme. - API key Bearer (recomendada), aceita nas mesmas rotas que o esquema HMAC.
Corpo
number. Order amount in fiat (BRL) to price. Must be greater than zero. Runs the same code path as a real quote, so the simulation matches what the quote will charge. - Valor da ordem em fiat (BRL) a precificar. Roda o MESMO caminho da cotacao real.
integer (optional). Price the order for this asset (id from GET /accepted-cryptos). BRLP carries NO platform rate (floor + your markup only), so simulating it shows that. Unknown id: 400 INVALID_ASSET_ID. Omit for the generic schedule. - Precifica para este ativo; o BRLP nao tem percentual de plataforma (so piso + seu markup).
Resposta
Default Response
curl --request POST \
--url https://sandbox.brlp.io/api/v1/partners/me/fees/simulate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<unknown>",
"assetId": "<unknown>"
}
'import requests
url = "https://sandbox.brlp.io/api/v1/partners/me/fees/simulate"
payload = {
"amount": "<unknown>",
"assetId": "<unknown>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<unknown>', assetId: '<unknown>'})
};
fetch('https://sandbox.brlp.io/api/v1/partners/me/fees/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.brlp.io/api/v1/partners/me/fees/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<unknown>',
'assetId' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.brlp.io/api/v1/partners/me/fees/simulate"
payload := strings.NewReader("{\n \"amount\": \"<unknown>\",\n \"assetId\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.brlp.io/api/v1/partners/me/fees/simulate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<unknown>\",\n \"assetId\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.brlp.io/api/v1/partners/me/fees/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<unknown>\",\n \"assetId\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body