v1
Stable REST contract
Build Python and JavaScript trading systems against Mayospell-owned authentication, account state, limit-order execution, positions, fills, option contracts, market data, and resumable events.
import os, uuid, requests
client_order_id = str(uuid.uuid4())
response = requests.post(
"https://mayospell.vercel.app/api/v1/orders",
headers={
"Authorization": f"Bearer {os.environ['MAYOSPELL_API_KEY']}",
"Idempotency-Key": client_order_id,
},
json={
"clientOrderId": client_order_id,
"symbol": "SPY260821C00600000",
"side": "buy", "quantity": 1,
"type": "limit", "limitPrice": 1.25,
"timeInForce": "day",
},
timeout=10,
)
response.raise_for_status()v1
Stable REST contract
6
Least-privilege scopes
SSE
Two event channels
Sandbox
Execution environment
A trading API is more than an order endpoint. Mayospell exposes the identity, recovery, audit, and safety behavior a bot needs when networks, providers, or strategies fail.
Separate keys per bot, least-privilege scopes, expiration, instant revocation, and HMAC digests instead of recoverable secrets.
Account ownership, contract limits, cash reservation, sell-to-close inventory, idempotency, and execution switches are enforced server-side.
Orders, fills, cash, positions, audit events, rate windows, and idempotency share a PostgreSQL consistency boundary.
Consume quote events and account events over SSE. Account streams resume after the last processed event with Last-Event-ID.
OpenAPI 3.1, structured errors, request IDs, standard rate headers, exact order reads, and production Python and JavaScript examples.
Every surface labels the current sandbox ledger. Brokerage, Combine, Practice, and live funded routing stay unavailable until separately certified.
The current release is deliberately staged: the contract is public, credential issuance is controlled, and execution remains inside Mayospell's isolated sandbox ledger.
Read the endpoint, scope, error, rate-limit, and retry rules before connecting account credentials.
Read the docsCredential issuance remains gated while Mayospell completes verified member and account mapping. The dashboard shows the exact access state.
Open developer dashboardExercise order reconciliation, idempotency, disconnect recovery, position limits, and kill-switch behavior against the isolated ledger.
Review the trust boundaryProduction truth
Mayospell does not present sandbox infrastructure as a broker, Practice Account, Combine, or live funded account. The page and developer dashboard state the current boundary at every decision point.
Direct answers about availability, account routing, failure behavior, and the difference between deployed infrastructure and live brokerage access.
The production v1 API, documentation, and Python request contract are online. New credential issuance is currently controlled, so the developer dashboard will show access as gated until Mayospell enables verified member issuance.
No. The current API is bound to Mayospell's isolated simulated ledger. It is not mapped to a real broker, clearing account, Combine, Practice Account, or live funded account.
Live routing requires an owned broker or clearing adapter, verified identity-to-account mapping, licensed options market data, reconciliation, and operational certification. Mayospell keeps the switch off until those controls are proven together.
Exact retries with the same UUID and payload are safe. Reusing the UUID with changed content is rejected, which prevents an ambiguous retry from becoming a different order.
Ready to design your integration?
Start with the complete endpoint, scope, retry, and streaming contract.