Ir al contenido

Your balance available to pay out

GET/treasury/positionProbar
Parámetros de consulta

La llamada la hace tu navegador, contra el servidor que elijas arriba. Si la documentación no está servida desde el mismo origen que la API, el navegador puede bloquear la respuesta por CORS: en ese caso abre estas páginas desde la propia API (/docs) o usa el curl de arriba.

GET
/treasury/position
curl --request GET \
--url 'http://localhost:3000/v1/treasury/position?asset=BS' \
--header 'x-api-key: <x-api-key>'

Scope treasury:read. Two figures: the balance you pay out from (prefundingBalance) and what you owe right now (creditDrawn).

With daily settlement (creditEnabled: true) you don’t fund in advance: prefundingBalance stays at 0 —normal, not an alarm— and creditDrawn grows during the day until you settle at the close.

Prefunded (creditEnabled: false): creditDrawn is always 0 and a payout without balance is rejected with 422 insufficient_tenant_funds before touching the payment network.

asset

Decimales: BS y USD 2; USDT y USDC 6 (1000000 = 1 USDT).

string
Allowed values: BS USD USDT USDC VESC

Por defecto BS, que es el activo con el que se dispersa

Posición del tenant

Media typeapplication/json
object
tenantId
string format: uuid
asset

Decimales: BS y USD 2; USDT y USDC 6 (1000000 = 1 USDT).

string
Allowed values: BS USD USDT USDC VESC
prefundingBalance

Minor units disponibles para dispersar

string
platformRevenueFromTenant
string
creditEnabled

true = operas con cierre diario y no te bloqueamos por saldo. false = prefondeado.

boolean
creditDrawn

Lo que debes ahora mismo, en minor units y en positivo. Es lo que se liquida en el cierre. 0 si estás al día.

string
creditLimit

Techo acordado de tu línea. null si no hay techo

string
nullable
creditAvailable

Lo que te queda de la línea. null si no hay techo

string
nullable
Examples

Con cierre diario, a media jornada

{
"tenantId": "3f1a0c22-9b41-4a77-8f0e-6d2c5b7a1e34",
"asset": "BS",
"prefundingBalance": "0",
"platformRevenueFromTenant": "415900",
"creditEnabled": true,
"creditDrawn": "4537190",
"creditLimit": null,
"creditAvailable": null
}