curl --request POST \
--url https://gateway-sandbox.matambaintelligence.com/v1/orders/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": "1000000001",
"symbol": "STANBICETF30",
"side": "buy",
"quantity": 100,
"type": "limit",
"time_in_force": "day",
"price_kobo": 12050,
"client_reference": "ord-88213"
}
'{
"object": "order_estimate",
"account": "1000000001",
"symbol": "DANGCEM",
"side": "buy",
"quantity": 10,
"type": "market",
"time_in_force": "day",
"price_kobo": null,
"estimated_total_kobo": 530338,
"estimated_total_kobo_decimal": "530337.5"
}Estimate an order
Returns the broker’s estimate of an order’s total: for a buy, what it would cost, and for a sell, what you’d receive. The estimate is indicative. Send the same body you’d use to place the order. This doesn’t place or store an order, and you don’t need an Idempotency-Key. Requires the trade scope.
curl --request POST \
--url https://gateway-sandbox.matambaintelligence.com/v1/orders/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": "1000000001",
"symbol": "STANBICETF30",
"side": "buy",
"quantity": 100,
"type": "limit",
"time_in_force": "day",
"price_kobo": 12050,
"client_reference": "ord-88213"
}
'{
"object": "order_estimate",
"account": "1000000001",
"symbol": "DANGCEM",
"side": "buy",
"quantity": 10,
"type": "market",
"time_in_force": "day",
"price_kobo": null,
"estimated_total_kobo": 530338,
"estimated_total_kobo_decimal": "530337.5"
}Authorizations
Body
The order to place or estimate.
Send numbers as JSON numbers, not quoted strings. We reject unknown fields and any field that appears twice, even with different letter case.
An ETF takes limit orders only. Shares take limit and market orders. The broker rejects a market order on an ETF with reject_reason set to etf_limit_orders_only. A market order is priced at the day's price limit: the upper limit for a buy, the lower limit for a sell.
limit, market day: good for the current trading session only. gtc: good till cancelled. ioc: immediate or cancel. fok: fill or kill. We accept every type with every time_in_force. The broker decides which combinations it supports, and rejects the rest as order_rejected with a reject_reason. If it refuses an order with a reason it doesn't publish, the order is uncertain until our operations team reconciles it.
day, gtc, ioc, fok Your own reference for this, such as your internal ID, so you can find it again. 1 to 64 printable ASCII characters, with no spaces, matched exactly. We store it and return it. It's part of the request an Idempotency-Key stands for, so a retry with a different client_reference returns 409. Never put personal data in it: no names, phone numbers, email addresses, BVN, NIN or account numbers of your customers.
1 - 64^[!-~]{1,64}$"ord-88213"
Response
The estimate.
The broker's estimate for an order. An estimate doesn't place or store anything.
The broker's estimate of the order's total, rounded to the whole kobo against the customer. For a buy, what the order would cost, rounded up. For a sell, what you'd receive, rounded down. In the sandbox, a buy includes 1.5% charges and a sell is net of them. The estimate is indicative, not a quote.