curl --request GET \
--url https://gateway-sandbox.matambaintelligence.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway-sandbox.matambaintelligence.com/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway-sandbox.matambaintelligence.com/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway-sandbox.matambaintelligence.com/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Retrieve an order
Returns the order, including everything the exchange has reported about it. Requires the read scope.
curl --request GET \
--url https://gateway-sandbox.matambaintelligence.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway-sandbox.matambaintelligence.com/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway-sandbox.matambaintelligence.com/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway-sandbox.matambaintelligence.com/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Authorizations
Response
An order.
Fees are not on the order. The broker fixes them only on the contract note, so see GET /v1/accounts/{account}/contract-notes for what an order cost.
sending: stored, and the send is in progress. If it still reads sending after its request has ended, its outcome was not recorded: it resolves as an uncertain order does, and an identical order is refused with 409 similar_order_unresolved until then. pending: the exchange has the order. partially_filled, filled: some or all of the order has traded. uncertain: the exchange did not confirm receipt. The gateway does not resubmit it, and our operations team reconciles it against the exchange's records. Until it resolves, an identical order on the same account is refused with 409 similar_order_unresolved. rejected: the broker or the exchange rejected it; see reject_reason. refused: it never reached the exchange: we refused it before sending, or our operations team confirmed the exchange never received it. cancelled: the exchange confirmed the cancel. expired: its time in force ran out. New values can be added: handle an unrecognised value with a safe default.
sending, pending, partially_filled, filled, uncertain, rejected, refused, cancelled, expired Why the broker or the exchange rejected the order. Set only when state is rejected. New values can be added: handle an unrecognised value with a safe default.
insufficient_funds, market_closed, settlement_lockout, etf_limit_orders_only, limit_orders_etf_only, unknown_symbol, symbol_not_tradable, account_not_at_broker, rejected_by_exchange, null The average price the filled shares traded at, in kobo, as a decimal string, before charges. It's exact when it has 12 decimal places or fewer, and otherwise rounded to 12. Null until a share has traded, or when we don't have the exchange's prices for the fills.
^[0-9]+(\.[0-9]{1,12})?$"47512.5"