curl --request POST \
--url https://{host}/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
}
'{
"object": "order_estimate",
"account": "<string>",
"symbol": "<string>",
"side": "buy",
"quantity": 123,
"type": "limit",
"time_in_force": "day",
"price_kobo": 123,
"estimated_total_kobo": 123
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}Estimate an order
Returns the exchange’s estimate of what an order would cost. 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.
curl --request POST \
--url https://{host}/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
}
'{
"object": "order_estimate",
"account": "<string>",
"symbol": "<string>",
"side": "buy",
"quantity": 123,
"type": "limit",
"time_in_force": "day",
"price_kobo": 123,
"estimated_total_kobo": 123
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}Authorizations
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.
Body
Send numbers as JSON numbers, not quoted strings. We reject unknown fields and any field that appears twice, even with different letter case.
An account code. Case-insensitive on input, and returned in uppercase.
^[A-Za-z0-9]{1,64}$The exchange's symbol, treated as uppercase. The exchange decides whether the symbol exists.
^[A-Za-z0-9.-]{1,20}$buy, sell The number of shares, as a whole number.
1 <= x <= 100000000limit, market day, gtc, ioc, fok The limit price in kobo, so ₦475.00 is 47500. Required for a limit order. Omit it for a market order.
1 <= x <= 1000000000Response
The estimate.
"order_estimate"buy, sell limit, market day, gtc, ioc, fok The limit price in kobo. Null for a market order.
The exchange's estimate of the order's total. This is indicative, not a quote.