Getting Started with Trading API
Place, observe, and reconcile a sandbox trade with the MyStocks Partner API.
Explore endpoints
59 of 59/bonds
List bonds & fixed income
Full endpoint documentationlistBondsReturns all available bonds, treasury bills, and fixed-income instruments. Includes coupon rate, maturity date, minimum investment, and current yield.
Parameters
instrumentTypestringquerycurrencystringqueryexchangestringqueryHeaders
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Response fields
bondsobject[]Requiredbonds[].idstringRequiredbonds[].namestring | nullRequiredbonds[].symbolstring | nullRequiredbonds[].issuerstring | nullRequiredbonds[].instrumentTypestringRequiredbonds[].assetTypestringRequiredbonds[].currencystring | nullRequiredbonds[].faceValuenumberRequiredbonds[].pricePerUnitnumberRequiredbonds[].couponRatenumber | nullRequiredPercentage points: 12.5 means 12.5%.
bonds[].currentYieldnumber | nullRequiredbonds[].yieldToMaturitynumber | nullRequiredbonds[].minInvestmentnumber | nullRequiredbonds[].maturityDatestring | nullRequiredbonds[].exchangestring | nullRequiredbonds[].statusstringRequiredbonds[].descriptionstring | nullRequiredcountintegerRequiredResponse codes
200Bond list.Workflow
- Authenticate with a sandbox partner key.
- Create or select a verified sub-account, or use the master account.
- Request a quote using the exact symbol, side, quantity, or
cashValue. - Place the order with the returned
quoteIdand anIdempotency-Key. - Poll order status or subscribe to signed webhook/SSE events.
- Inspect executions, portfolio, buying power, and ledger entries.
- Reconcile the completed trade against the daily report.
The full request sequence is in Trading, including market, limit, stop, time-in-force, cancellation, and fractional cash-value examples.
Important invariants
- Never reuse an expired or already-consumed quote.
- Never generate a new idempotency key when retrying the same write.
- Treat webhook delivery as at-least-once and potentially out of order.
- Do not treat a submitted or pending order as settled custody.
Use the API Tester for individual calls and the API Reference for the exact request schema.
Exercise the order lifecycle
Use the guided sandbox workflow with a synthetic, funded customer. The quote-to-trade handoff exercises the quote-gated API; the simulator exercises deterministic lifecycle transitions separately.
- Create a pending simulator order and copy its actual
orderId. - Partially fill five of ten units, inspect executions, then fill the remainder.
- Settle the filled order and check its settlement state separately from the order status.
- Read the wallet, portfolio and transactions, comparing amounts and quantities to the starting state.
- Create separate rejected and cancelled orders and check reservation release.
Use Retry same request only with the unchanged URL and body. Inspect both the response and the resulting order state to verify that a retry did not duplicate the write. Review Errors for response codes and Webhooks for event verification. Next, add reconciliation checks from Reconciliation.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on