API Documentation

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.

🔑Don't have an API key yet? Contact info@agaone.com to request institutional access.
Run in Postman

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 '{}'
FieldValue
Token TypeJWT / access_token
Token Scopeaplatform-trade-bridge
Header FormatAuthorization: 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.

1Auth
2Portfolio
3Tickers
4Prices
5Create Order
6History
7Modify / Close / Cancel

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.

APlatform Trade Bridge API

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.

ParameterTypeRequiredDescription
x-api-keyheaderYesYour API key credential
x-client-idheaderYesYour 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.

ParameterTypeRequiredDescription
AuthorizationheaderYesBearer {{tradeToken}}
Content-TypeheaderYesapplication/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.

ParameterTypeRequiredDescription
AuthorizationheaderYesBearer {{tradeToken}}
Content-TypeheaderYesapplication/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.

ParameterTypeRequiredDescription
TickerIdinteger (query)YesNumeric ticker ID from Ticker Settings (e.g. Gold = 3, Silver = 7)
AuthorizationheaderYesBearer {{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.

ParameterTypeRequiredDescription
SidestringYes"buy" or "sell"
QuantitynumberYesOrder quantity (min 0.01, max 1000)
TickerIdintegerYesTicker ID from Ticker Settings (3 = Gold, 7 = Silver)
IsPendingbooleanYesfalse = market order
TpnumberNoTake Profit level
SlnumberNoStop 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.

ParameterTypeRequiredDescription
SidestringYes"buy" or "sell"
QuantitynumberYesOrder quantity
TickerIdintegerYesTicker ID from Ticker Settings
IsPendingbooleanYestrue = limit / pending order
LimitPricenumberYesLimit price that triggers execution
TpnumberNoTake Profit level
SlnumberNoStop 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.

ParameterTypeRequiredDescription
pageSizeinteger (query)NoMaximum rows per page (default: 100)
DateFromISO dateYesStart of history range
DateToISO dateYesEnd of history range
CulturestringNoLocale for formatting (e.g. en-US)
SearchTextstringNoFree-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.

ParameterTypeRequiredDescription
OrderIDstringYesTarget order ID (from Order History)
PricenumberYesNew price
TpnumberNoNew Take Profit
SlnumberNoNew 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.

ParameterTypeRequiredDescription
OrderIDstringYesActive order ID (from Order History)
QtyToClosenumberYesQuantity 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.

ParameterTypeRequiredDescription
OrderIDstringYesPending 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.

ParameterTypeRequiredDescription
AuthorizationheaderYesBearer {{tradeToken}}
Content-TypeheaderYesapplication/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.

ParameterTypeRequiredDescription
OrderIdstringYesOrder 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"
  }'
Collection Variables

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.

VariableDescriptionScope
baseUrlAPI base URLall requests
apiKeyx-api-key credentialauth only
clientIdx-client-id credentialauth only
tradeTokenJWT token from Auth responseall non-auth
tickerIdSelected ticker ID from Ticker Settingsfrom #3
priceTickerIdTicker ID for Prices query paramprices #4
symbolHuman-readable ticker name (e.g. "Gold 1 Oz")display
quantityOrder quantity (min 0.01, max 1000)orders
orderIdTarget order for modify/close/cancelmodify/close
tp / slTake Profit & Stop Loss levelsorders
tpOffset / slOffsetPoint offset for auto-calculating TP/SL (default: 10)orders
limitPriceTrigger price for pending limit orderspending
openPriceAsk price from Prices response (entry for Buy)from #4
closePriceBid price from Prices response (for Sell/Close)from #4
pricePrecisionDecimal places for prices (default: 2)from #3
quantityPrecisionDecimal places for qty (default: 3)from #3
Integrations

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.

Reference

Rate Limits

The A-MX™ API enforces rate limits to ensure fair usage across all institutional clients.

TierRequests/minRequests/day
Standard6010,000
Professional300100,000
EnterpriseCustom

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Error Codes

CodeNameDescription
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions
404Not FoundResource not found
409ConflictDuplicate or conflicting operation
422UnprocessableValid request but cannot be processed
429Rate LimitedToo many requests
500Server ErrorInternal platform error
{
  "error": {
    "code": "INVALID_COMMODITY",
    "message": "The specified commodity 'XYZ' is not supported.",
    "status": 400
  }
}

Changelog

v1.2.0March 2026

Added /v1/orders and /v1/positions endpoints. Enhanced proof-of-reserve attestation with independent auditor support.

v1.1.0January 2026

Added tokenization endpoints, KYC verification, and full provenance traceability.

v1.0.0November 2025

Initial release — commodity pricing, trade execution, vault inventory, and settlement.

SDKs

Official SDKs are available for institutional integration:

Pythonpip install agaone-sdk
Node.jsnpm install @agaone/sdk
JavaMaven coordinatesCOMING SOON
.NETNuGet packageCOMING SOON