Skip to main content
GET
Retrieve an account's balance

Authorizations

Authorization
string
header
required

Authorization: Bearer <key>. Sandbox keys start with mgw_test_ and live keys start with mgw_live_. Each key works only in its own environment, and a live key works only from the IP addresses or ranges registered for it.

Scopes

read

Path Parameters

account
string
required

One of your account codes, from GET /v1/accounts. An account code. Case-insensitive on input, and returned in uppercase.

Pattern: ^[A-Za-z0-9]{1,64}$

Response

The account's balance.

The account's cash, with every figure as the broker defines it. The broker keeps cash to fractions of a kobo, so each figure is given twice: exact, as a _kobo_decimal string, and in whole kobo, rounded so that what the account can spend is never overstated: opening_kobo and available_kobo round down, pending_debits_kobo rounds up. opening_kobo and available_kobo can be negative when the account owes money. Size orders by available_kobo.

object
string
required
Allowed value: "balance"
account
string
required

The account code.

currency
string
required

Always NGN. Every amount in the balance is in kobo.

Allowed value: "NGN"
opening_kobo
integer<int64>
required

The account's opening balance, as the broker defines it, rounded down to the whole kobo. Can be negative.

opening_kobo_decimal
string
required

The account's opening balance, in kobo, as an exact decimal string. Can be negative.

Example:

"10000000"

pending_debits_kobo
integer<int64>
required

Money the broker is holding against the account, as the broker defines it, rounded up to the whole kobo. In the sandbox, the cash held for open buy orders, charges included. Never negative.

pending_debits_kobo_decimal
string
required

Money the broker is holding against the account, in kobo, as an exact decimal string. Never negative.

Example:

"59831.63125"

available_kobo
integer<int64>
required

What the account can spend, as the broker defines it, rounded down to the whole kobo. In the sandbox, opening_kobo_decimal minus pending_debits_kobo_decimal. Can be negative.

available_kobo_decimal
string
required

What the account can spend, in kobo, as an exact decimal string. Can be negative.

Example:

"9940168.36875"