Conventions
A few platform-wide rules. These are the deliberate places Boursa differs from Alpaca; everything else follows Alpaca's shapes.
Money is integer micros
Every monetary amount is an integer in micros — millionths of one EGP (1 EGP = 1_000_000 micros). Fund units are micros too. This avoids the floating-point drift you get from decimal-string money.
A field carrying micros always ends in _micros:
{ "limit_price_micros": 80000000, "avg_price_micros": 82210000 }To display: divide by 1,000,000 and format as ج.م (Arabic) or EGP.
vs. Alpaca: Alpaca returns money as decimal strings (
"82.21"). Boursa returns integer micros. Same precision, no float ambiguity.
Quantities are whole shares
EGX trades whole shares only — there is no fractional or notional order. qty is an integer; there is no notional field.
Percentages are fractions
Where a percentage is returned on an Alpaca-shaped view, it is a fraction: 0.05 means 5%. (Some legacy fields still return whole percents; these are being standardized — each field documents its unit.)
Time
Timestamps are RFC-3339 (2026-06-14T11:00:00+03:00). The market session is defined in Africa/Cairo. In the sandbox the clock is a simulated clock you can fast-forward with POST /admin/sandbox/clock-advance; query it with GET /v1/clock.
Digits in responses are Western (0-9) regardless of locale.
Identifiers
Resource IDs are prefixed, opaque strings: inv_… (investor), ord_… (order), tnt_… (tenant), kyc_… (application). Treat them as opaque.
Idempotency & retries
Money endpoints require an Idempotency-Key header; orders also accept a tenant-unique client_order_id. See Authentication.
Pagination
List endpoints accept limit (1–200, default 100). Cursor pagination (page_token / next_page_token, Alpaca's contract) is on the roadmap for high-volume list and market-data endpoints.
Errors
Errors are a JSON object with a stable string code, a message, and a request id:
{ "error": { "code": "PRICE_BAND_EXCEEDED", "message": "…" },
"request_id": "req_…" }Localize by code. See the full list on Errors.
vs. Alpaca: Alpaca uses numeric codes (
40310000). Boursa uses readable string codes that localize cleanly and read well in logs.
EGX market rules (enforced for you)
Every order is checked against EGX structure before it reaches the broker:
- Price band: a limit price must be within ±20% of the reference price.
- Tick size: prices must be a multiple of the tick for their level.
- Whole shares: integer
qty. - Session: Sun–Thu, 10:00–14:30 Africa/Cairo (sandbox clock).
- Settlement: T+2 business days.
- Fees: a per-order commission (min + bps) plus statutory fees; the reservation holds a fee ceiling.