Notus API
Fiat

Create a fiat withdrawal quote

This endpoint creates a fiat withdrawal quote.

POST
/api/v1/fiat/withdraw/quote
x-api-key<token>

In: header

chainIdnumber
paymentMethodToReceivestring
Value in"PIX"
amountToSendInCryptoCurrencystring
cryptoCurrencyToSendstring
Value in"USDC" | "BRZ"
transactionFeePercent?number

Percentage fee to be charged (0 to 99%). The fee is deducted from the input token and sent to the treasuryAddress, if configured.

Rangevalue <= 99.99

Response Body

curl -X POST "https://api.notus.team/api/v1/fiat/withdraw/quote" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 0,
    "paymentMethodToReceive": "PIX",
    "amountToSendInCryptoCurrency": "string",
    "cryptoCurrencyToSend": "USDC"
  }'
const body = JSON.stringify({
  "chainId": 0,
  "paymentMethodToReceive": "PIX",
  "amountToSendInCryptoCurrency": "string",
  "cryptoCurrencyToSend": "USDC"
})

fetch("https://api.notus.team/api/v1/fiat/withdraw/quote", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.notus.team/api/v1/fiat/withdraw/quote"
  body := strings.NewReader(`{
    "chainId": 0,
    "paymentMethodToReceive": "PIX",
    "amountToSendInCryptoCurrency": "string",
    "cryptoCurrencyToSend": "USDC"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.notus.team/api/v1/fiat/withdraw/quote"
body = {
  "chainId": 0,
  "paymentMethodToReceive": "PIX",
  "amountToSendInCryptoCurrency": "string",
  "cryptoCurrencyToSend": "USDC"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;

var body = BodyPublishers.ofString("""{
  "chainId": 0,
  "paymentMethodToReceive": "PIX",
  "amountToSendInCryptoCurrency": "string",
  "cryptoCurrencyToSend": "USDC"
}""");
HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://api.notus.team/api/v1/fiat/withdraw/quote"))
  .header("Content-Type", "application/json")
  .POST(body)
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var body = new StringContent("""
{
  "chainId": 0,
  "paymentMethodToReceive": "PIX",
  "amountToSendInCryptoCurrency": "string",
  "cryptoCurrencyToSend": "USDC"
}
""", Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.PostAsync("https://api.notus.team/api/v1/fiat/withdraw/quote", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
  "withdrawQuote": {
    "quoteId": "123e4567-e89b-12d3-a456-426614174000",
    "cryptoCurrencyToSend": "USDC",
    "fiatCurrencyToReceive": "BRL",
    "amountToSendInCryptoCurrency": "100",
    "amountToReceiveInFiatCurrency": "100",
    "transactionFeeInCryptoCurrency": "10",
    "estimatedGasFeeInCryptoCurrency": "10",
    "expiresAt": "2021-01-01T00:00:00.000Z"
  }
}
{
  "statusCode": 500,
  "id": "FAILED_TO_GET_FIAT_QUOTE",
  "message": "string"
}