curl --request GET \
--url https://{host}/v1/accounts/{account} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/accounts/{account}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/accounts/{account}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/accounts/{account}"
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))
}{
"object": "account",
"code": "1000000077",
"application": "app_5n2c6xq4ld7kz3pw7vby",
"created_at": "2026-09-25T07:41:30Z"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_request",
"message": "The request could not be read.",
"doc_url": "https://docs.matambaintelligence.com/errors#invalid_request"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "Invalid credentials.",
"doc_url": "https://docs.matambaintelligence.com/errors#unauthorized"
}
}{
"error": {
"type": "permission_error",
"code": "insufficient_scope",
"message": "This API key does not have the scope this request requires. Nothing was done.",
"doc_url": "https://docs.matambaintelligence.com/errors#insufficient_scope"
}
}{
"error": {
"type": "invalid_request_error",
"code": "account_not_found",
"message": "No such account.",
"doc_url": "https://docs.matambaintelligence.com/errors#account_not_found"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Nothing was done. Send the same request again after the Retry-After interval.",
"doc_url": "https://docs.matambaintelligence.com/errors#rate_limited"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "The gateway encountered an internal error. Send the same request again, exactly as you sent it.",
"doc_url": "https://docs.matambaintelligence.com/errors#internal_error"
}
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "The gateway is temporarily unable to process this request. Send the same request again, with the same Idempotency-Key if it has one.",
"doc_url": "https://docs.matambaintelligence.com/errors#service_unavailable"
}
}Retrieve an account
Returns one of your accounts from our records, without asking the broker. Takes no query parameters. For what the broker holds in it, read its balance and positions.
curl --request GET \
--url https://{host}/v1/accounts/{account} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/accounts/{account}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/accounts/{account}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/accounts/{account}"
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))
}{
"object": "account",
"code": "1000000077",
"application": "app_5n2c6xq4ld7kz3pw7vby",
"created_at": "2026-09-25T07:41:30Z"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_request",
"message": "The request could not be read.",
"doc_url": "https://docs.matambaintelligence.com/errors#invalid_request"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "Invalid credentials.",
"doc_url": "https://docs.matambaintelligence.com/errors#unauthorized"
}
}{
"error": {
"type": "permission_error",
"code": "insufficient_scope",
"message": "This API key does not have the scope this request requires. Nothing was done.",
"doc_url": "https://docs.matambaintelligence.com/errors#insufficient_scope"
}
}{
"error": {
"type": "invalid_request_error",
"code": "account_not_found",
"message": "No such account.",
"doc_url": "https://docs.matambaintelligence.com/errors#account_not_found"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Nothing was done. Send the same request again after the Retry-After interval.",
"doc_url": "https://docs.matambaintelligence.com/errors#rate_limited"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "The gateway encountered an internal error. Send the same request again, exactly as you sent it.",
"doc_url": "https://docs.matambaintelligence.com/errors#internal_error"
}
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "The gateway is temporarily unable to process this request. Send the same request again, with the same Idempotency-Key if it has one.",
"doc_url": "https://docs.matambaintelligence.com/errors#service_unavailable"
}
}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.
Path Parameters
One of your account codes, from GET /v1/accounts. An account code. Case-insensitive on input, and returned in uppercase.
^[A-Za-z0-9]{1,64}$Response
One of your accounts.
"account"The code to pass as account in an order or allocation.
The application that opened the account, when you opened it through the API. Null when we added the account for you.
^app_[a-z2-7]{20}$When the account became yours to trade for through the API.