Groot Payment API
Complete API reference for the Grootbit Payment platform. Manage clients, crypto wallets, balances, withdrawals, invoices and real-time events.
Authentication
To start using the Groot Payment API you need to authenticate using your Partner ID and Partner Secret. These credentials are provided by email to your manager. If you don't know your ID or Secret, please contact us.
Authorization: Bearer <your_token>Tokens expire after 15 minutes. Refresh before expiration.
Auth
Retrieve a JWT token to be used for the next 15 minutes.
Authenticate with your Partner ID and Secret to receive a bearer token.
Request Body
| Parameter | Type | Description |
|---|---|---|
| partnerId REQUIRED | string | Your unique partner identifier |
| partnerSecret REQUIRED | string | Your secret API key |
{
"partnerId": "663917f2763b1bff22ec5ce9",
"partnerSecret": "04d03a20-f280-488f-8d71-87b69256015a"
}{
"expiresAt": "2024-05-06T21:32:31.198Z",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}{
"message": "wrong-secret",
"error": "Forbidden",
"statusCode": 403
}curl -X POST https://api.grootbit.com/login \
-H "Content-Type: application/json" \
-d '{
"partnerId": "663917f2763b1bff22ec5ce9",
"partnerSecret": "04d03a20-f280-488f-8d71-87b69256015a"
}'const response = await fetch('https://api.grootbit.com/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ partnerId: '663917f2763b1bff22ec5ce9', partnerSecret: '04d03a20-f280-488f-8d71-87b69256015a' }) }); const data = await response.json(); console.log(data.token);
import requests response = requests.post( 'https://api.grootbit.com/login', json={ 'partnerId': '663917f2763b1bff22ec5ce9', 'partnerSecret': '04d03a20-f280-488f-8d71-87b69256015a' } ) data = response.json() print(data['token'])
using System.Net.Http; using System.Text; using System.Text.Json; var client = new HttpClient(); var content = new StringContent( JsonSerializer.Serialize(new { partnerId = "663917f2763b1bff22ec5ce9", partnerSecret = "04d03a20-f280-488f-8d71-87b69256015a" }), Encoding.UTF8, "application/json" ); var response = await client.PostAsync( "https://api.grootbit.com/login", content ); var data = await response.Content.ReadAsStringAsync();
import java.net.http.*; import java.net.URI; HttpClient client = HttpClient.newHttpClient(); String json = """ { "partnerId": "663917f2763b1bff22ec5ce9", "partnerSecret": "04d03a20-f280-488f-8d71-87b69256015a" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/login")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Client
The /client endpoints allow you to register new clients. Each client receives a set of crypto wallets upon registration.
Register a client using their document number. The response will contain all crypto wallets registered for this client.
Request Body
| Parameter | Type | Description |
|---|---|---|
| document REQUIRED | string | Client's document number (e.g. CPF) |
{
"document": "06260544863"
}{
"document": "06260544863",
"partnerId": "663917f2763b1bff22ec5ce9",
"createdAt": "2024-05-06T21:22:15.882Z",
"updatedAt": "2024-05-06T21:22:15.882Z",
"id": "66394a073b428e21809703cb",
"wallets": [
{ "coin": "btc", "network": "bitcoin", "address": "bc1qzjweah64wrf3xa4fhmjpjz8d2r56zt7mhayekn" },
{ "coin": "eth", "network": "ethereum", "address": "0xd52eedd0a7daf1b560a5ea38a0aa9d8fb55056b3" },
{ "coin": "usdt", "network": "ethereum", "address": "0xd52eedd0a7daf1b560a5ea38a0aa9d8fb55056b3" },
{ "coin": "usdc", "network": "ethereum", "address": "0xd52eedd0a7daf1b560a5ea38a0aa9d8fb55056b3" },
{ "coin": "trx", "network": "tron", "address": "TDCwaU4zxrfh2U4KxtrQ7EYCbzXGSmZ4PU" },
{ "coin": "usdt", "network": "tron", "address": "TDCwaU4zxrfh2U4KxtrQ7EYCbzXGSmZ4PU" }
]
}{
"message": "client-already-exists",
"error": "Conflict",
"statusCode": 409
}curl -X POST https://api.grootbit.com/client \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"document": "06260544863"
}'const response = await fetch('https://api.grootbit.com/client', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, body: JSON.stringify({ document: '06260544863' }) }); const client = await response.json(); console.log(client.wallets);
import requests response = requests.post( 'https://api.grootbit.com/client', headers={'Authorization': f'Bearer {token}'}, json={'document': '06260544863'} ) client = response.json() print(client['wallets'])
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var content = new StringContent( JsonSerializer.Serialize(new { document = "06260544863" }), Encoding.UTF8, "application/json" ); var response = await client.PostAsync( "https://api.grootbit.com/client", content ); var result = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String json = "{ \"document\": \"06260544863\" }"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/client")) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + token) .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Balance
Retrieve balance information for clients and the partner account.
Get the current balance of a registered client across all supported coins.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| clientId REQUIRED | string | The unique identifier of the client |
{
"clientId": "664283ecbc1dd982429d9098",
"partnerId": "663917f2763b1bff22ec5ce9",
"balances": {
"btc": 0,
"trx": 0,
"usdt": 1900,
"usdc": 0,
"eth": 0
}
}curl -X GET https://api.grootbit.com/balance/664283ecbc1dd982429d9098 \ -H "Authorization: Bearer YOUR_TOKEN"
const clientId = '664283ecbc1dd982429d9098'; const response = await fetch( `https://api.grootbit.com/balance/${clientId}`, { headers: { 'Authorization': `Bearer ${token}` } } ); const balance = await response.json(); console.log(balance.balances);
import requests client_id = '664283ecbc1dd982429d9098' response = requests.get( f'https://api.grootbit.com/balance/{client_id}', headers={'Authorization': f'Bearer {token}'} ) balance = response.json() print(balance['balances'])
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var clientId = "664283ecbc1dd982429d9098"; var response = await client.GetAsync( $"https://api.grootbit.com/balance/{clientId}" ); var balance = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String clientId = "664283ecbc1dd982429d9098"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/balance/" + clientId)) .header("Authorization", "Bearer " + token) .GET() .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Get the current balance of the partner's main account. This balance can be distributed to client accounts.
{
"clientId": null,
"partnerId": "663917f2763b1bff22ec5ce9",
"balances": {
"btc": 0,
"trx": 0,
"usdt": 100,
"usdc": 0,
"eth": 0
}
}curl -X GET https://api.grootbit.com/balance \ -H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch('https://api.grootbit.com/balance', { headers: { 'Authorization': `Bearer ${token}` } }); const balance = await response.json(); console.log(balance.balances);
import requests response = requests.get( 'https://api.grootbit.com/balance', headers={'Authorization': f'Bearer {token}'} ) balance = response.json() print(balance['balances'])
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var response = await client.GetAsync( "https://api.grootbit.com/balance" ); var balance = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.grootbit.com/balance"))
.header("Authorization", "Bearer " + token)
.GET()
.build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString()
);Transfer
Fund client accounts. The balance used will be from the partner's main account.
Add or remove balance from a client's account. Use positive values to add and negative values to remove.
All available coins can be used: btc, trx, usdt, usdc, eth.
Removed money from the client's account will be available on the partner account.
Request Body
| Parameter | Type | Description |
|---|---|---|
| clientId REQUIRED | string | The target client identifier |
| btc / eth / usdt / usdc / trx | number | Amount to add (positive) or remove (negative) |
{
"clientId": "664283ecbc1dd982429d9098",
"usdt": -100
}{
"clientId": "664283ecbc1dd982429d9098",
"partnerId": "663917f2763b1bff22ec5ce9",
"balances": {
"btc": 0,
"eth": 0,
"usdt": 1900,
"usdc": 0,
"trx": 0
}
}curl -X POST https://api.grootbit.com/fund \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"clientId": "664283ecbc1dd982429d9098",
"usdt": -100
}'const response = await fetch('https://api.grootbit.com/fund', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, body: JSON.stringify({ clientId: '664283ecbc1dd982429d9098', usdt: -100 }) }); const result = await response.json(); console.log(result.balances);
import requests response = requests.post( 'https://api.grootbit.com/fund', headers={'Authorization': f'Bearer {token}'}, json={ 'clientId': '664283ecbc1dd982429d9098', 'usdt': -100 } ) result = response.json() print(result['balances'])
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var content = new StringContent( JsonSerializer.Serialize(new { clientId = "664283ecbc1dd982429d9098", usdt = -100 }), Encoding.UTF8, "application/json" ); var response = await client.PostAsync( "https://api.grootbit.com/fund", content ); var result = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String json = """ { "clientId": "664283ecbc1dd982429d9098", "usdt": -100 } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/fund")) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + token) .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Withdraw
Request cryptocurrency withdrawals to external wallets.
Request a withdrawal of crypto to an external wallet address. A fee will be deducted from the requested amount.
Request Body
| Parameter | Type | Description |
|---|---|---|
| coin REQUIRED | string | Cryptocurrency to withdraw (btc, eth, usdt, usdc, trx) |
| amount REQUIRED | number | Amount to withdraw |
| wallet REQUIRED | string | Destination wallet address (must be a valid ETH, BTC or TRX address) |
| clientId REQUIRED | string | Client identifier |
{
"coin": "usdt",
"amount": 1824.12,
"wallet": "TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX",
"clientId": "66417972bc1dd982429d908e"
}{
"id": "66418d7295e0cb6c380f02c0",
"amount": {
"coin": "usdt",
"value": 1723.414
},
"fee": {
"coin": "usdt",
"value": 100.706
},
"wallet": "TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX",
"status": "pending",
"createdAt": "2024-05-13T03:48:02.041Z"
}{
"message": [
"Address must be a valid eth, btc or trx address"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "insufficient-balance",
"error": "Bad Request",
"statusCode": 400
}curl -X POST https://api.grootbit.com/withdraw \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"coin": "usdt",
"amount": 1824.12,
"wallet": "TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX",
"clientId": "66417972bc1dd982429d908e"
}'const response = await fetch('https://api.grootbit.com/withdraw', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, body: JSON.stringify({ coin: 'usdt', amount: 1824.12, wallet: 'TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX', clientId: '66417972bc1dd982429d908e' }) }); const withdraw = await response.json(); console.log(withdraw);
import requests response = requests.post( 'https://api.grootbit.com/withdraw', headers={'Authorization': f'Bearer {token}'}, json={ 'coin': 'usdt', 'amount': 1824.12, 'wallet': 'TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX', 'clientId': '66417972bc1dd982429d908e' } ) withdraw = response.json() print(withdraw)
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var content = new StringContent( JsonSerializer.Serialize(new { coin = "usdt", amount = 1824.12, wallet = "TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX", clientId = "66417972bc1dd982429d908e" }), Encoding.UTF8, "application/json" ); var response = await client.PostAsync( "https://api.grootbit.com/withdraw", content ); var withdraw = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String json = """ { "coin": "usdt", "amount": 1824.12, "wallet": "TZF9xjZXbe9kXXU6AM6fckcPc5FuhohdCX", "clientId": "66417972bc1dd982429d908e" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/withdraw")) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + token) .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Transactions
Get client transaction history including deposits and withdrawals.
Retrieve the transaction history for a specific client, filtered by date.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| clientId REQUIRED | string | Client identifier |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| since | string (ISO 8601) | Filter transactions since this date |
GET /statement/664cd2535e9396829854370f?since=2024-05-13T12:00:00.999Z
[
{
"id": "664cd3fa4c2bea7aea89023b",
"type": "withdraw",
"createdAt": "2024-05-21T17:03:54.152Z",
"clientId": "664cd2535e9396829854370f",
"partnerId": "663917f2763b1bff22ec5ce9",
"amountRequested": 1082,
"amountReceived": 1041.78,
"fee": 40.22,
"coin": "trx"
},
{
"id": "664cd3f9e1c4889f4476b590",
"type": "deposit",
"createdAt": "2024-05-21T17:03:53.971Z",
"clientId": "664cd2535e9396829854370f",
"partnerId": "663917f2763b1bff22ec5ce9",
"amount": 2164,
"coin": "trx"
}
]curl -X GET "https://api.grootbit.com/statement/664cd2535e9396829854370f?since=2024-05-13T12:00:00.999Z" \ -H "Authorization: Bearer YOUR_TOKEN"
const clientId = '664cd2535e9396829854370f'; const since = '2024-05-13T12:00:00.999Z'; const response = await fetch( `https://api.grootbit.com/statement/${clientId}?since=${since}`, { headers: { 'Authorization': `Bearer ${token}` } } ); const transactions = await response.json(); console.log(transactions);
import requests client_id = '664cd2535e9396829854370f' since = '2024-05-13T12:00:00.999Z' response = requests.get( f'https://api.grootbit.com/statement/{client_id}', params={'since': since}, headers={'Authorization': f'Bearer {token}'} ) transactions = response.json() print(transactions)
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var clientId = "664cd2535e9396829854370f"; var since = "2024-05-13T12:00:00.999Z"; var response = await client.GetAsync( $"https://api.grootbit.com/statement/{clientId}?since={since}" ); var transactions = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String clientId = "664cd2535e9396829854370f"; String since = "2024-05-13T12:00:00.999Z"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/statement/" + clientId + "?since=" + since)) .header("Authorization", "Bearer " + token) .GET() .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Invoice
Create PIX QR codes to deposit and exchange balance into crypto.
Create a new invoice with a PIX QR code for depositing BRL and converting to crypto.
Request Body
| Parameter | Type | Description |
|---|---|---|
| market REQUIRED | string | Trading pair (e.g. "usdt-brl") |
| amount REQUIRED | object | Object with coin and value |
| clientId REQUIRED | string | Target client identifier |
{
"market": "usdt-brl",
"amount": {
"coin": "usdt",
"value": 312
},
"clientId": "672976cea1b8912dcbf7bf4a"
}{
"market": "usdt-brl",
"amountRequested": {
"coin": "usdt",
"value": 312
},
"source": {
"coin": "brl",
"value": 1803.8904
},
"target": {
"coin": "usdt",
"value": 312
},
"clientId": "672976cea1b8912dcbf7bf4a",
"partnerId": "663917f2763b1bff22ec5ce9",
"pix": {
"id": "672a25a1924a2fb025378dbc",
"pixQrCode": "00020101021226850014br.gov.bcb.pix..."
},
"id": "672a25a2a48b02b5fe446a91"
}{
"message": "invalid-coin",
"error": "Bad Request",
"statusCode": 400
}curl -X POST https://api.grootbit.com/invoice \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"market": "usdt-brl",
"amount": { "coin": "usdt", "value": 312 },
"clientId": "672976cea1b8912dcbf7bf4a"
}'const response = await fetch('https://api.grootbit.com/invoice', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, body: JSON.stringify({ market: 'usdt-brl', amount: { coin: 'usdt', value: 312 }, clientId: '672976cea1b8912dcbf7bf4a' }) }); const invoice = await response.json(); console.log(invoice.pix.pixQrCode);
import requests response = requests.post( 'https://api.grootbit.com/invoice', headers={'Authorization': f'Bearer {token}'}, json={ 'market': 'usdt-brl', 'amount': {'coin': 'usdt', 'value': 312}, 'clientId': '672976cea1b8912dcbf7bf4a' } ) invoice = response.json() print(invoice['pix']['pixQrCode'])
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var content = new StringContent( JsonSerializer.Serialize(new { market = "usdt-brl", amount = new { coin = "usdt", value = 312 }, clientId = "672976cea1b8912dcbf7bf4a" }), Encoding.UTF8, "application/json" ); var response = await client.PostAsync( "https://api.grootbit.com/invoice", content ); var invoice = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String json = """ { "market": "usdt-brl", "amount": { "coin": "usdt", "value": 312 }, "clientId": "672976cea1b8912dcbf7bf4a" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/invoice")) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + token) .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Retrieve details of an existing invoice by its ID, including status and PIX QR code.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| invoiceId REQUIRED | string | The unique invoice identifier |
{
"market": "usdt-brl",
"amountRequested": { "coin": "usdt", "value": 312 },
"source": { "coin": "brl", "value": 1807.2912 },
"target": { "coin": "usdt", "value": 312 },
"clientId": "672976cea1b8912dcbf7bf4a",
"partnerId": "663917f2763b1bff22ec5ce9",
"pix": {
"id": "67297898924a2fb025376b1f",
"pixQrCode": "00020101021226850014br.gov.bcb.pix..."
},
"id": "67297899a48b02b5fe446a8b",
"status": "pending"
}{
"message": "invoice-not-found",
"error": "Not Found",
"statusCode": 404
}curl -X GET https://api.grootbit.com/invoice/67297899a48b02b5fe446a8b \ -H "Authorization: Bearer YOUR_TOKEN"
const invoiceId = '67297899a48b02b5fe446a8b'; const response = await fetch( `https://api.grootbit.com/invoice/${invoiceId}`, { headers: { 'Authorization': `Bearer ${token}` } } ); const invoice = await response.json(); console.log(invoice.status);
import requests invoice_id = '67297899a48b02b5fe446a8b' response = requests.get( f'https://api.grootbit.com/invoice/{invoice_id}', headers={'Authorization': f'Bearer {token}'} ) invoice = response.json() print(invoice['status'])
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var invoiceId = "67297899a48b02b5fe446a8b"; var response = await client.GetAsync( $"https://api.grootbit.com/invoice/{invoiceId}" ); var invoice = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String invoiceId = "67297899a48b02b5fe446a8b"; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/invoice/" + invoiceId)) .header("Authorization", "Bearer " + token) .GET() .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Get a price quote for a given market and amount without creating an invoice.
Request Body
| Parameter | Type | Description |
|---|---|---|
| market REQUIRED | string | Trading pair (e.g. "usdt-brl") |
| amount REQUIRED | object | Object with coin and value |
{
"market": "usdt-brl",
"amount": {
"coin": "usdt",
"value": 312
}
}{
"market": "usdt-brl",
"amountRequested": {
"coin": "usdt",
"value": 312
},
"source": {
"coin": "brl",
"value": 1877.56
},
"target": {
"coin": "usdt",
"value": 312
}
}curl -X POST https://api.grootbit.com/quote \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"market": "usdt-brl",
"amount": { "coin": "usdt", "value": 312 }
}'const response = await fetch('https://api.grootbit.com/quote', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, body: JSON.stringify({ market: 'usdt-brl', amount: { coin: 'usdt', value: 312 } }) }); const quote = await response.json(); console.log(quote.source.value); // BRL amount needed
import requests response = requests.post( 'https://api.grootbit.com/quote', headers={'Authorization': f'Bearer {token}'}, json={ 'market': 'usdt-brl', 'amount': {'coin': 'usdt', 'value': 312} } ) quote = response.json() print(quote['source']['value']) # BRL amount needed
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var content = new StringContent( JsonSerializer.Serialize(new { market = "usdt-brl", amount = new { coin = "usdt", value = 312 } }), Encoding.UTF8, "application/json" ); var response = await client.PostAsync( "https://api.grootbit.com/quote", content ); var quote = await response.Content.ReadAsStringAsync();
HttpClient client = HttpClient.newHttpClient(); String json = """ { "market": "usdt-brl", "amount": { "coin": "usdt", "value": 312 } } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.grootbit.com/quote")) .header("Content-Type", "application/json") .header("Authorization", "Bearer " + token) .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse<String> response = client.send( request, HttpResponse.BodyHandlers.ofString() );
Webhooks
Webhook events are sent as POST requests to the URL configured in your account. Please contact our team to configure your webhook URL.
{
"event": "new-statement-transaction",
"data": {
"id": "string",
"type": "deposit",
"clientId": "string",
"coin": "btc" | "eth" | "usdt" | "trx" | "usdc",
"amount": 42.32,
"createdAt": "Date"
}
}{
"event": "new-statement-transaction",
"data": {
"id": "string",
"type": "withdraw",
"clientId": "string",
"coin": "btc" | "eth" | "usdt" | "trx" | "usdc",
"amountRequested": 50,
"fee": 5,
"amountReceived": 45,
"createdAt": "Date"
}
}{
"event": "update-balance",
"data": {
"clientId": "string",
"balance": {
"btc": 42.32,
"eth": 42.32,
"usdt": 42.32,
"trx": 42.32,
"usdc": 42.32
}
}
}{
"event": "new-client",
"data": {
"id": "string",
"document": "string",
"partnerId": "string",
"createdAt": "Date",
"updatedAt": "Date"
}
}