A-MX™ API Documentation
Institutional Commodity Infrastructure API
The AgaOne A-MX™ API provides programmatic access to the full commodity trading infrastructure — from real-time precious metals pricing and trade execution to vault operations, tokenization, compliance, and physical asset verification. The APlatform Trade Bridge is the first live integration module of the A-MX™ layer, exposing the AgaOne Commodities DMCC trading engine through a single unified API. This reference documents all 12 endpoints — authentication, portfolio, tickers, prices, and full order lifecycle management.
Base URL
https://api.agaone.com/v1
All API endpoints are served over HTTPS. HTTP requests will be rejected.
The APlatform Trade Bridge uses {{baseUrl}} as configured in your integration environment. Contact AgaOne to receive the base URL for your assigned environment.
Authentication
The APlatform Trade Bridge uses a two-phase authentication flow. Phase one exchanges your API key and Client ID for a short-lived JWT trade token. Phase two uses that token as a standard Bearer credential on all subsequent endpoints.
Phase 1Auth Request
Call GET {{baseUrl}}/api/trade/auth with the two credential headers. No Authorization header is required on this call. The response returns a JWT access_token which should be stored as {{tradeToken}}.
curl -X GET "{{baseUrl}}/api/trade/auth" \
-H "x-api-key: {{apiKey}}" \
-H "x-client-id: {{clientId}}"Phase 2Authorized Requests
All other endpoints require the bearer token in the Authorization header and a JSON content type.
curl -X POST "{{baseUrl}}/api/trade/portfolio" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{}'| Field | Value |
|---|---|
| Token Type | JWT / access_token |
| Token Scope | aplatform-trade-bridge |
| Header Format | Authorization: Bearer {{tradeToken}} |
Workflow
A typical Trade Bridge session follows the lifecycle below. Authenticate once, retrieve reference data, stream prices, and then manage orders through create / modify / close / cancel operations.
Quick Start
Get up and running in three steps:
1.Request your credentials
Contact AgaOne to receive your x-api-key, x-client-id, and the base URL for your environment.
2.Obtain a trade token
Authenticate and capture the JWT access_token:
curl -X GET "{{baseUrl}}/api/trade/auth" \
-H "x-api-key: {{apiKey}}" \
-H "x-client-id: {{clientId}}"3.Fetch portfolio and tickers
Use the trade token to query the portfolio, then retrieve the ticker configuration needed for prices and orders:
curl -X POST "{{baseUrl}}/api/trade/ticker-settings" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{}'Platform Architecture
The AgaOne platform operates on a dual-layer architecture. A-CORE™ is the institutional ERP backbone built on Dynamics 365, serving as the system of record. A-MX™ is the orchestration and API layer that exposes platform capabilities to external integrations. A-INTELLIGENCE™ provides AI-driven compliance, risk analytics, and operational intelligence across both layers.
A-MX™ Layer
The orchestration, settlement, and API layer connecting all modules to external institutions. Handles pricing feeds, banking rails, custody connectors, super app integrations, and cross-border logic.
A-CORE™ Layer
The institutional infrastructure backbone built on Dynamics 365 — multi-entity accounting, treasury logic, regulatory traceability, audit trail, settlement control, and financial reporting.
A-INTELLIGENCE™ Layer
AI-driven layer wrapping the entire platform — automated AML screening, KYC verification, risk analytics, sanctions monitoring, anomaly detection, and operational insights.
Core
GET/api/trade/auth#1
Authenticate with your API credentials. Returns a JWT access_token which must be used as Bearer {{tradeToken}} in all subsequent requests. Call this first in every session.
| Parameter | Type | Required | Description |
|---|---|---|---|
| x-api-key | header | Yes | Your API key credential |
| x-client-id | header | Yes | Your Client ID credential |
curl -X GET "{{baseUrl}}/api/trade/auth" \
-H "x-api-key: {{apiKey}}" \
-H "x-client-id: {{clientId}}"// Token capture fallback paths payload.access_token || access_token || token || payload.token
No request body. The Authorization header is not required on this endpoint — only x-api-key and x-client-id.
POST/api/trade/portfolio#2
Returns the authenticated user's portfolio — balance, equity, and open positions. Send an empty JSON body.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | header | Yes | Bearer {{tradeToken}} |
| Content-Type | header | Yes | application/json |
curl -X POST "{{baseUrl}}/api/trade/portfolio" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{}'// Response variables portfolio.Balance → portfolioBalance portfolio.Equity → portfolioEquity
Market Data
POST/api/trade/ticker-settings#3
Returns all available trading tickers and their full configuration. The TickerID values returned here are used as the TickerId query parameter in the Prices endpoint and in Order bodies.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | header | Yes | Bearer {{tradeToken}} |
| Content-Type | header | Yes | application/json |
curl -X POST "{{baseUrl}}/api/trade/ticker-settings" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{}'// Key response fields (per ticker) TickerID // → used as TickerId in Prices & Orders Description // e.g. "Gold 1 Oz", "Silver 1 Oz" Symbol / SymbolName MinOrderSize // e.g. 0.01 MaxOrderSize // e.g. 1000 PricePrecision // decimal places for prices QuantityPrecision // decimal places for qty
GET/api/trade/prices#4
Fetches current Bid/Ask prices for a specific ticker. The TickerId query parameter must be the numeric ID returned by Ticker Settings.
| Parameter | Type | Required | Description |
|---|---|---|---|
| TickerId | integer (query) | Yes | Numeric ticker ID from Ticker Settings (e.g. Gold = 3, Silver = 7) |
| Authorization | header | Yes | Bearer {{tradeToken}} |
curl -X GET "{{baseUrl}}/api/trade/prices?TickerId=3" \
-H "Authorization: Bearer {{tradeToken}}"// Key response fields prices[].TickerId prices[].Bid // → closePrice prices[].Ask // → openPrice (use for Buy) prices[].Symbol
TickerId is sourced from the Ticker Settings endpoint (#3). Inspect the tickers array in that response and use the TickerID field of your desired instrument as the TickerId here.
Order Management
POST/api/trade-bridge/order/create#5
Creates a market order that executes immediately at the current price. Requires Bid/Ask prices from the Prices endpoint to be fetched first. Optionally set Take Profit and Stop Loss levels.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Side | string | Yes | "buy" or "sell" |
| Quantity | number | Yes | Order quantity (min 0.01, max 1000) |
| TickerId | integer | Yes | Ticker ID from Ticker Settings (3 = Gold, 7 = Silver) |
| IsPending | boolean | Yes | false = market order |
| Tp | number | No | Take Profit level |
| Sl | number | No | Stop Loss level |
curl -X POST "{{baseUrl}}/api/trade-bridge/order/create" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"Side": "buy",
"Quantity": 1,
"TickerId": 3,
"IsPending": false,
"Tp": 6000,
"Sl": 1500
}'POST/api/trade-bridge/order/create-pending#6
Creates a pending (limit) order that only executes when the market reaches the specified LimitPrice. The order remains open until triggered, modified, or cancelled.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Side | string | Yes | "buy" or "sell" |
| Quantity | number | Yes | Order quantity |
| TickerId | integer | Yes | Ticker ID from Ticker Settings |
| IsPending | boolean | Yes | true = limit / pending order |
| LimitPrice | number | Yes | Limit price that triggers execution |
| Tp | number | No | Take Profit level |
| Sl | number | No | Stop Loss level |
curl -X POST "{{baseUrl}}/api/trade-bridge/order/create-pending" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"Side": "buy",
"Quantity": 2,
"TickerId": 3,
"IsPending": true,
"LimitPrice": 1500,
"Tp": 6000,
"Sl": 500
}'POST/api/trade/order-history#7
Retrieves paginated order history for a given date range. Use the OrderID values from the response as input for Modify, Close, or Cancel operations.
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageSize | integer (query) | No | Maximum rows per page (default: 100) |
| DateFrom | ISO date | Yes | Start of history range |
| DateTo | ISO date | Yes | End of history range |
| Culture | string | No | Locale for formatting (e.g. en-US) |
| SearchText | string | No | Free-text filter |
curl -X POST "{{baseUrl}}/api/trade/order-history?pageSize=100" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"DateFrom": "2026-03-01T00:00:00.000Z",
"DateTo": "2026-03-25T00:00:00.000Z",
"Culture": "en-US",
"SearchText": ""
}'// Response paths (fallbacks) history.rows[] // or rows[] / payload.rows[] .OrderID // → use for Modify / Close / Cancel .orderId .id
POST/api/trade-bridge/order/modify#8
Modifies an existing open or pending order's price, Take Profit, and/or Stop Loss. Obtain the OrderID from the Order History response.
| Parameter | Type | Required | Description |
|---|---|---|---|
| OrderID | string | Yes | Target order ID (from Order History) |
| Price | number | Yes | New price |
| Tp | number | No | New Take Profit |
| Sl | number | No | New Stop Loss |
curl -X POST "{{baseUrl}}/api/trade-bridge/order/modify" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"OrderID": "1091",
"Price": 3500,
"Tp": 3600,
"Sl": 3000
}'POST/api/trade-bridge/order/close#9
Closes an active open order. Supports partial closes by specifying the quantity to close in QtyToClose.
| Parameter | Type | Required | Description |
|---|---|---|---|
| OrderID | string | Yes | Active order ID (from Order History) |
| QtyToClose | number | Yes | Quantity to close (partial close supported) |
curl -X POST "{{baseUrl}}/api/trade-bridge/order/close" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"OrderID": "1090",
"QtyToClose": 1
}'POST/api/trade-bridge/order/cancel#10
Cancels a pending (limit) order that has not yet been triggered. The OrderID must refer to a pending order, not an active position.
| Parameter | Type | Required | Description |
|---|---|---|---|
| OrderID | string | Yes | Pending order ID (from Order History) |
curl -X POST "{{baseUrl}}/api/trade-bridge/order/cancel" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"OrderID": "1091"
}'Account & Reporting
POST/api/trade/get-exposure#11
Returns the current exposure and risk summary across all open positions in the portfolio.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | header | Yes | Bearer {{tradeToken}} |
| Content-Type | header | Yes | application/json |
curl -X POST "{{baseUrl}}/api/trade/get-exposure" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{}'POST/api/trade/get-order-info#12
Retrieves detailed information about a specific order by its ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| OrderId | string | Yes | Order ID from Order History |
curl -X POST "{{baseUrl}}/api/trade/get-order-info" \
-H "Authorization: Bearer {{tradeToken}}" \
-H "Content-Type: application/json" \
-d '{
"OrderId": "1085"
}'Environment Variables
The variables below are used throughout the Trade Bridge collection. Configure them in your Postman environment or your integration layer. Several are populated dynamically from endpoint responses.
| Variable | Description | Scope |
|---|---|---|
| baseUrl | API base URL | all requests |
| apiKey | x-api-key credential | auth only |
| clientId | x-client-id credential | auth only |
| tradeToken | JWT token from Auth response | all non-auth |
| tickerId | Selected ticker ID from Ticker Settings | from #3 |
| priceTickerId | Ticker ID for Prices query param | prices #4 |
| symbol | Human-readable ticker name (e.g. "Gold 1 Oz") | display |
| quantity | Order quantity (min 0.01, max 1000) | orders |
| orderId | Target order for modify/close/cancel | modify/close |
| tp / sl | Take Profit & Stop Loss levels | orders |
| tpOffset / slOffset | Point offset for auto-calculating TP/SL (default: 10) | orders |
| limitPrice | Trigger price for pending limit orders | pending |
| openPrice | Ask price from Prices response (entry for Buy) | from #4 |
| closePrice | Bid price from Prices response (for Sell/Close) | from #4 |
| pricePrecision | Decimal places for prices (default: 2) | from #3 |
| quantityPrecision | Decimal places for qty (default: 3) | from #3 |
Vault Custodians
A-MX™ connects to institutional vault custodians including Brink's, Loomis, and Malca-Amit for real-time inventory synchronization, transfer orchestration, and proof-of-reserve attestation.
Banking Partners
Settlement rails connect through banking partner APIs for cross-border wire transfers, FX conversion, and real-time reconciliation across multiple currencies.
Market Data Feeds
Real-time pricing from LBMA, COMEX, Bloomberg, and Reuters feeds with sub-second latency for institutional trading operations.
Exchange Connectivity
Direct connectivity to DGCX and Borsa Istanbul for exchange-traded commodity execution and settlement.
Rate Limits
The A-MX™ API enforces rate limits to ensure fair usage across all institutional clients.
| Tier | Requests/min | Requests/day |
|---|---|---|
| Standard | 60 | 10,000 |
| Professional | 300 | 100,000 |
| Enterprise | Custom | |
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Error Codes
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 409 | Conflict | Duplicate or conflicting operation |
| 422 | Unprocessable | Valid request but cannot be processed |
| 429 | Rate Limited | Too many requests |
| 500 | Server Error | Internal platform error |
{
"error": {
"code": "INVALID_COMMODITY",
"message": "The specified commodity 'XYZ' is not supported.",
"status": 400
}
}Changelog
Added /v1/orders and /v1/positions endpoints. Enhanced proof-of-reserve attestation with independent auditor support.
Added tokenization endpoints, KYC verification, and full provenance traceability.
Initial release — commodity pricing, trade execution, vault inventory, and settlement.
SDKs
Official SDKs are available for institutional integration:
pip install agaone-sdknpm install @agaone/sdkMaven coordinatesCOMING SOONNuGet packageCOMING SOON