How the sandbox behaves
| Symbols | Four symbols are available: DANGCEM at ₦475.00, MTNN at ₦250.00, ZENITHBANK at ₦38.50, and STANBICETF30 (an ETF) at ₦120.50. |
| Fills | An order that crosses the listed price fills at once, in full, at that price. A market order always crosses, a limit buy crosses at or above the listed price, and a limit sell at or below it. A sell fills only if the account holds every share it sells; otherwise none of it fills. |
| Unfilled orders | An ioc or fok order that doesn’t fill at once expires at once. Any other stays open: a day order until midnight, West Africa Time (WAT), when it expires, and a gtc order until you cancel it. Only a limit order can be cancelled, so an unfilled gtc market sell stays open. |
| Market hours | The sandbox market never closes. |
| Balance | Every account starts with ₦1,000,000.00, except the account ending in 99, which starts with ₦0. |
| Wallet | Your sandbox wallet opens with ₦10,000,000.00 of test money when we set up your access, credited once. For more, ask us. See Fund an account. |
| Price limits | 10% either side of the listed price. A market buy is priced at the upper limit and a market sell at the lower limit. |
| Fees | The sandbox charges a flat 1.5%. Live fees are set by the broker: for its fee schedule, ask us. |
| Reset | A restart of the sandbox, such as for a new release, resets its broker: every account’s balance and positions start again, and an order still open there ends expired within 30 seconds. Your keys, your webhook endpoint and our records of your orders, applications, allocations, events and wallet stay, so money allocated before a restart stays in allocated_kobo but is no longer in the accounts’ balances. The sandbox’s broker never gives a number twice, so an exchange_order_id is never one you’ve seen before. A restart doesn’t free Fatima Bello’s test identity once her account has opened. |
Test your error handling
Before you go live, send these requests to check that your integration handles each error.| Request | Response |
|---|---|
A request to any endpoint without the Authorization header | 401 unauthorized. |
A request with any key starting mgw_live_ | 401 unauthorized, with a message that it’s a live key and this is the sandbox. |
GET /v1/nothing | 404 not_found. |
PUT /v1/accounts | 405 method_not_allowed, with an Allow header. |
POST /v1/orders with Content-Type: text/plain | 415 unsupported_media_type. |
A document of 1,000,000 bytes or more, or a file that isn’t the image its Content-Type says | 413 document_too_large, or 422 invalid_document. Nothing reaches the sandbox’s broker. |
A different file of a type we already hold, or a document for an application that is rejected | 409 document_already_delivered, or 409 application_not_accepting_documents. Nothing is sent. |
| A request body over 16 KiB | 413 request_too_large. |
An order with "quantity": "10", a number in quotes | 400 invalid_request. Send numbers as JSON numbers. |
An order without symbol | 400 missing_required_field, with param set to symbol. |
| An order for an account that isn’t yours | 400 unknown_account. |
GET /v1/accounts/0000000000 | 404 account_not_found. |
GET /v1/orders/ord_doesnotexist22222222 | 404 order_not_found. |
GET /v1/applications/app_doesnotexist22222222 | 404 application_not_found. |
GET /v1/allocations/alc_doesnotexist22222222 | 404 allocation_not_found. |
Buy on the account ending in 99 | 422 order_rejected with reject_reason: insufficient_funds, because the account has a zero balance. |
Place a market order on STANBICETF30 | 422 order_rejected with reject_reason: etf_limit_orders_only. An ETF takes limit orders only. |
| Place a market order for a symbol that isn’t listed above | 422 unknown_symbol. The order isn’t stored, so you can reuse the idempotency key. |
| Place a limit buy for a symbol that isn’t listed above | 422 order_rejected with reject_reason: unknown_symbol. Only a market order or a sell is checked before we store it, so a limit buy reaches the broker, which rejects it. |
Reuse an Idempotency-Key with a different order, such as step 3’s key with quantity 11 | 409 duplicate_order, with order naming the order that owns the key. |
More than 40 requests sent together, such as 80 GET /v1/accounts | 429 rate_limited, with a Retry-After: 1 header. |
A market buy of 20,000 DANGCEM | 422 limit_exceeded: counted at the day’s upper price limit, it’s more than the default day’s order value. Nothing is stored. |
| Cancel a market order | 409 order_not_cancelable. Only a limit order can be cancelled. |
While an order for 2,222 shares is uncertain (see Test values), send another identical order with a new key | 409 similar_order_unresolved, with order naming the uncertain order. Nothing is stored. |
| An allocation of more than your sandbox wallet holds, within the day’s allocation limit | 422 wallet_too_low. Nothing is stored. |
| An allocation of ₦60,000,000 | 422 limit_exceeded: it’s more than the default day’s allocations. Nothing is stored. |
An application with bank 0000000021, Heritage Bank’s code at the broker: the CBN revoked its licence | 400 invalid_request, with param set to bank. Nothing is stored. |
Reuse an application’s Idempotency-Key with a different form | 409 duplicate_application, with application naming the application that owns the key. |
Reuse an allocation’s Idempotency-Key with a different amount | 409 duplicate_allocation, with allocation naming the allocation that owns the key. |
Test identities
An application in the sandbox is checked as in live: its BVN, its NIN if you send one, and its bank account, against the identity registries and the customer’s bank. The sandbox’s registries and banks hold only the people below, so an application opens only for one of them. Send a row’s names,date_of_birth, bvn, nin, bank and bank_account_number, any bank_account_name, and an email of your own. Any partner can send every row but Fatima Bello’s as often as it likes, and each that opens does so every time. Fatima Bello is held to one account, as every person is in live: once any partner has opened hers, an application with her bvn ends already_at_broker. The checks stop for a BVN rejected 3 times in 24 hours, counted across every partner in the sandbox. A BVN starting with eight zeros is never stopped, except Fatima Bello’s.
| First name | Middle name | Last name | Date of birth | bvn | nin | bank | bank_account_number | The bank’s name for it | What happens |
|---|---|---|---|---|---|---|---|---|---|
| Adaeze | Ngozi | Okafor | 1990-05-01 | 00000000101 | 00000000201 | 058 | 0000000021 | OKAFOR ADAEZE NGOZI | It opens: opened. |
| Chukwuemeka | None | Obi | 1985-11-23 | 00000000102 | 00000000202 | 044 | 0000000022 | CHUKWUEMEKA OBI | It opens: opened. |
| Oluwaseun | Adebayo | Balogun | 1993-02-14 | 00000000103 | 00000000203 | 057 | 0000000023 | BALOGUN OLUWASEUN A. | It opens: opened. |
| Fatima | Zainab | Bello | 1988-07-09 | 00000000104 | 00000000204 | 058 | 0000000024 | BELLO FATIMA ZAINAB | It opens once, for whichever partner sends her first: opened. After that, rejected with reject_reason: already_at_broker. |
| Tunde | None | Bakare | 1979-12-31 | 00000000105 | 00000000205 | 044 | 0000000025 | TUNDE BAKARE | The depository (CSCS) refuses to open the account: rejected with reject_reason: declined_by_depository. |
| Ngozi | None | Eze | 1995-03-30 | 00000000000 | 00000000206 | 057 | 0000000026 | EZE NGOZI | The depository opens the account, and the broker rejects it: rejected with reject_reason: rejected_by_broker. |
| Send | What happens |
|---|---|
A row’s bvn with another first_name or last_name | rejected with reject_reason: identity_mismatch and param set to first_name or last_name. |
A row’s bvn with one letter added, missing or changed in a first_name or last_name, both it and the row’s having five letters or more | It’s checked as the row: the names match. |
A row’s bvn with another date_of_birth | rejected with reject_reason: identity_mismatch and param set to date_of_birth. |
A row’s bvn with another middle_name, or none | It’s checked as the row: the middle name isn’t compared. |
A bvn or a nin that isn’t in the table | rejected with reject_reason: identity_unverified and param set to bvn or nin. |
A bvn that doesn’t start with eight zeros and isn’t in the table, such as 22999888999, once the checks have rejected it 3 times in 24 hours, from any partner | rejected with reject_reason: identity_unverified and no param: we stopped checking it. |
A row’s bvn with another row’s bank and bank_account_number | rejected with reject_reason: bank_account_mismatch and param set to bank_account_number. |
Adaeze’s row with bank_account_number 0000000027, an account at her bank in her business’s name, ADAEZE OKAFOR VENTURES | rejected with reject_reason: bank_account_mismatch and param set to bank_account_number: an account opens in the customer’s own name only. |
A row’s bank_account_number with another bank | rejected with reject_reason: bank_account_mismatch and param set to bank_account_number: that bank holds no such account. |
A row’s bank set to 215, a bank the depository (CSCS) doesn’t take | rejected with reject_reason: declined_by_depository and param set to bank, before any identity check. |
bvn 00000000015 | The BVN registry can’t answer. The application stays submitted while we ask again, 30 minutes later, then 2 hours and 8 hours after that. After 4 asks, about 10 hours and 30 minutes after the fourth document, it becomes uncertain, with an application.uncertain event. No one settles it in the sandbox, so it stays uncertain. In live, our operations team ends it unplaced, and you send it again with a new key. |
Test values
Each row shows one outcome on demand, only in the sandbox, over the fill rule above. For the order quantities, use a limit buy ofSTANBICETF30 below ₦120.50, such as price_kobo 12000, so the order stays open.
| Send | What happens |
|---|---|
| A market order | 201 pending. Within 30 seconds it becomes filled, with an order.filled event. |
| An order for exactly 1,111 shares | 201 pending. 444 shares fill at once at your price and the rest stays open, so within 30 seconds you receive order.partially_filled. |
| An order for exactly 2,222 shares | 201 uncertain: the sandbox withholds the broker’s response to the order. Within about two minutes, reconciliation finds it at the broker and it becomes pending, with an order.pending event. |
| A cancel of an open limit order | 202. Within 30 seconds the order becomes cancelled. |
| A cancel of an open order of exactly 3,333 shares | 503 cancel_unconfirmed: the cancel reaches the broker, and the sandbox withholds its response. Within 30 seconds the order becomes cancelled. |
A limit ioc or fok order that doesn’t cross the listed price | 201 pending. It expires at once, and within 30 seconds it becomes expired. |
An account ending in 98 | The broker is settling the day’s trades for it. Its balance: 503 settlement_lockout with Retry-After: 60. An estimate or an order: 422 order_rejected with reject_reason: settlement_lockout. Its positions, trades and contract notes read as usual, and an allocation to it is booked. Ask us to add one to your sandbox. |
| An application for a test identity whose account opens, then its four documents | 201 documents_required; each document 200 delivered, and the fourth makes it submitted. Within about 10 seconds we check it, the sandbox’s depository opens the account and its broker confirms it, and it becomes opened, with an application.opened event that carries the new account. In live, each step can take longer, and the broker may review the account first, which the sandbox can’t show. |
An application for a test identity changed as a row of Test identities that ends rejected shows, or for Tunde Bakare or Ngozi Eze, then its four documents | Within about 10 seconds, rejected with the reject_reason and param that section gives, and an application.rejected event. The same request sent again with its key answers 422 application_rejected. |
An application for Fatima Bello once any partner has opened her account, or with an email the sandbox’s broker holds, then its four documents | rejected with reject_reason: already_at_broker. Every other test identity opens again for any partner, so you can rehearse with it as often as you like; Fatima Bello is held to one account, as every person is in live. |
| An application for Ngozi Eze, then its four documents | rejected with reject_reason: rejected_by_broker: the broker refused the account once the depository had opened it, which stays open there, and reason says not to send the application again. In live, a corrected application for the same customer would end already_at_broker: contact us instead. |
An application with a state, state_of_origin or lga_of_origin that isn’t in the broker’s lists, then its four documents | rejected with reject_reason: invalid_field and param naming the field, before anything is checked or opened, as in live. Correct the field and send the application with a new key. |
| An allocation to one of your accounts | 201 booked, with an allocation.booked event. |
| Outcome | Why |
|---|---|
An order in refused | Only an order we could not send to the broker at all. |
An order in sending | An order is sending only while its request is in progress, or after it if its outcome was not recorded. No test value causes either. |
An order rejected with account_not_at_broker | The sandbox’s broker opens any ten-digit account the first time it’s used. |
An order rejected with limit_orders_etf_only | Retired: no order is rejected with it now. An order the sandbox rejected with it before 1 October 2026 keeps it. |
An order rejected with market_closed | The sandbox market never closes. |
An order rejected with rejected_by_exchange | Only when the broker can’t accept an order as we sent it, rejects an order after accepting it, or our operations team records a rejection. |
An order rejected with symbol_not_tradable | Every symbol the sandbox lists can be traded. |
An application in refused | Only an application we could not take at all. |
An application in sending | An application is sending only while its request is in progress, or after it if its outcome was not recorded. No test value causes either. |
An application in unplaced | Only our operations team settles an uncertain application as unplaced. |
An application rejected with declined_by_broker | Only our operations team records that the broker declined an application after accepting it. |
An allocation in refused | Only an allocation we could not send to the broker at all. |
An allocation in rejected | No test value makes the sandbox’s broker refuse a deposit, so no allocation reject reason can be shown. |
An allocation in sending | An allocation is sending only while its request is in progress, or after it if its outcome was not recorded. No test value causes either. |
An allocation in uncertain | No test value withholds the broker’s response to an allocation. |
| The limit on requests in progress at once | Not on demand: the sandbox’s broker answers at once, so your requests are rarely in progress together. |
account_blocked | Only while our operations team has blocked that one account. |
account_money_blocked | Only while our operations team has blocked allocations to that one account. |
account_not_at_broker | The sandbox’s broker opens any ten-digit account the first time it’s used. |
account_trading_blocked | Only while our operations team has blocked orders on that one account. |
allocation_not_sent | Only an allocation we could not send to the broker at all. |
allocation_rejected | No test value makes the sandbox’s broker refuse a deposit. |
application_not_sent | Only an application we could not take at all. |
document_in_flight | Only while the same document is still being sent, which no test value holds open. |
document_rejected | We hold each document until the depository has opened the account, so no request is answered with the broker’s refusal of one. |
document_unconfirmed | Only when we could not record taking a document, which no test value causes. |
earlier_document_unconfirmed | Only after our answer to an earlier file was not confirmed, which no test value makes happen. |
exchange_error | Only when the broker’s response can’t be processed. |
exchange_unavailable | Only while we can’t reach the broker, or can’t take a document. |
feature_not_enabled | Account opening and deposits are enabled on the sandbox for every partner. |
insufficient_scope | Only with a key that lacks a scope. Create one with fewer scopes in your partner portal to test with. |
internal_error | Only on an internal gateway error. |
order_not_sent | Only an order we could not send to the broker at all. |
outcome_not_recorded | Only when the outcome of a new order, application or allocation was not recorded. No test value causes it. |
partner_closed | Only once your partner account is closed. |
partner_money_paused | Only while our operations team has paused allocations for your partner account. |
partner_suspended | Only while our operations team has suspended your partner account. |
partner_trading_paused | Only while our operations team has paused trading for your partner account. |
security_blocked | Only while our operations team has blocked that symbol. |
security_close_only | Only while our operations team has made that symbol close-only. |
service_unavailable | Only when the gateway is temporarily unable to process the request. |
similar_allocation_unresolved | Only while an allocation is unresolved, and no test value withholds the broker’s response to an allocation. |
too_many_applications_in_progress | Only once your company has the most applications in progress it may have at once, as in live. No test value reaches it sooner. |
too_many_keys | The API never answers it. Your partner portal does, when a key you create there, or rotate with an overlap, would pass the most working keys your company may hold. |
trading_paused | Only while our operations team has paused trading. |
| A live key from an unregistered address | A sandbox key with no addresses works from any address. One created with addresses works only from them, and from any other gets the same 401 unauthorized a live key does. |
| Linking a customer the broker already knows | Our operations team does it with the broker, outside the API. |
| A withdrawal from your wallet | Only our operations team records one: no API request makes one. Ask us for one to test with. |