How much you have used against your limits
GET/limits/usageProbar
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.
const url = 'http://localhost:3000/v1/limits/usage?asset=BS';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/v1/limits/usage?asset=BS' \ --header 'x-api-key: <x-api-key>'Scope payments:read. Your usage for the day and the month against the rule that applies to you. Use it before launching a batch.
When a limit is exceeded the payout is rejected with 422 limit_exceeded, and error.meta says which one (per_tx_max, daily_max, monthly_max or daily_count_max), the cap and the scope.
Limits have an instrument: the same amount may fit by bank transfer and not by pago móvil, whose per-operation cap is Bs 100,000.00. There are also limits per beneficiary.
Precedence: beneficiary > customer > tenant > platform, and within each, a specific instrument before *. The most specific one wins ENTIRELY: caps are not intersected, they are replaced.
NOTE: this query returns the total for the ASSET, without splitting by instrument. The check the payout makes does filter by instrument, so if you have different caps per instrument use this figure as a guide, not an exact calculation. What ended failed or reversed doesn’t count: it was compensated and no money left.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Query Parameters
Sección titulada «Query Parameters»Decimales: BS y USD 2; USDT y USDC 6 (1000000 = 1 USDT).
Por defecto BS
Consumo de un usuario tuyo
Responses
Sección titulada «Responses»Consumo y límite aplicable
object
Decimales: BS y USD 2; USDT y USDC 6 (1000000 = 1 USDT).
object
Importe dispersado hoy
Operaciones de hoy
Importe dispersado este mes
La regla aplicable. null si no hay ninguna configurada
object
Instrumento al que aplica, o *
Example
{ "asset": "BS", "usage": { "day_amount": "45371900", "day_count": "38", "month_amount": "912440000" }, "limit": { "scope": "tenant", "method": "*", "per_tx_max": "10000000", "daily_max": "500000000", "monthly_max": null, "daily_count_max": null }}