Pre-trade fee quote
Execution & Order Management (OMS)
/quote/{symbol}
Pre-trade fee quote
getQuoteReturns a pre-trade fee quote using the latest delayed price observation. Includes the local and USD price, gross order cost, base fee, partner markup fee, and total cost for BUY or estimated proceeds for SELL. Also returns whether the partner wallet has sufficient balance/holdings. Size the quote with either quantity (share mode) or cashValue (cash mode) — they are mutually exclusive, and the subsequent trade must use the same mode and value. Cash-mode quotes return an indicative fractional quantity; the order is sized at execution price and validated against the quoted cashValue. Quotes remain valid for 60 seconds to protect quote-to-fill price integrity. Mobile clients should display quoteExpiresAt, refresh when 10 seconds remain or whenever the app resumes, and require confirmation again if the refreshed cost, proceeds, fee, or quantity changes. Fetching a replacement quote does not place an order. Always fetch a quote immediately before placing a trade to confirm the current cost.
Parameters
symbolstringpathRequiredExchange-qualified ticker (e.g. SCOM.KE) or bare ticker.
Example: SCOM.KE
typeBUY | SELLqueryOrder direction. Defaults to BUY.
Example: BUY
quantitynumberqueryNumber of shares to quote (fractional allowed). Mutually exclusive with cashValue. Defaults to 1 when neither is passed.
Example: 500
cashValuenumberqueryUSD amount to quote in cash mode (fractional investing). Mutually exclusive with quantity. The trade must then be placed with the same cashValue and this quoteId.
Example: 50
subAccountIdstringqueryOptional sub-account ID when quoting a trade for /users/{userId}/trade. The account must exist under the authenticated partner key.
Example: usr_abc123
Headers
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Response fields
quoteIdstringQuote ID to submit in the subsequent trade request.
quoteTtlSecondsintegerExample: 60
quoteIssuedAtstringquoteExpiresAtstringsourceUpdatedAtstring | nullTimestamp of the source market price used for this quote.
dataFreshnessSecondsinteger | nullAge in seconds of the source market price when the quote was issued.
asOfstring | nullCanonical timestamp of the upstream price observation; equivalent to sourceUpdatedAt.
ageSecondsinteger | nullCanonical price age in seconds; equivalent to dataFreshnessSeconds.
stalebooleanTrue when the price observation is older than two refresh intervals.
delayModeDELAYED | END_OF_DAYdelayMinutesintegerExample: 15
refreshIntervalSecondsintegerExample: 900
providermstocks | mansadisclaimerstringPlain-English delayed-price warning.
dataQualityobjectThe published market-data freshness contract. African equity quotes are supplied by the exchanges on a 15-minute-delayed basis, not in real time. MyStocks holds full exchange data rights. The API refresh target is 900 seconds during the published coverage window, with an end-of-day pass after market close.
dataQuality.asOfstring | nullRequiredTimestamp of the exchange observation, not the time the API response was generated.
dataQuality.ageSecondsinteger | nullRequiredAge of the price in seconds (now − asOf).
dataQuality.stalebooleanRequiredTrue when the price is older than two refresh intervals.
dataQuality.delayModeDELAYED | END_OF_DAYRequiredDELAYED — exchange-supplied data in the 15-minute-delayed latency class. END_OF_DAY — outside the window; this is the most recent close, not a live quote.
dataQuality.delayMinutesintegerRequiredExchange feed latency class in minutes. This is distinct from the API refresh target.
Example: 15
dataQuality.refreshIntervalSecondsintegerRequiredTarget interval between API ingestion refreshes during the published coverage window.
Example: 900
dataQuality.providermstocks | mansaRequiredMyStocks ingestion connector for this exchange feed. This field does not describe exchange licensing or partner entitlement.
dataQuality.disclaimerstringRequiredPlain-English statement of what this price is and is not.
symbolstringExample: "SCOM.KE"
namestringexchangestringcurrencystringExample: "KES"
ledgerCurrencystringExample: "USD"
fxRatenumberManaged FX rate used to convert local price to USD.
fxSourcestringExample: "MYSTOCKS_MANAGED_FX"
fxRateAsOfstring | nullfxConversionobjectfxConversion.sourceCurrencystringExample: "KES"
fxConversion.sourceAmountnumberExample: 65000
fxConversion.targetCurrencystringExample: "USD"
fxConversion.targetAmountnumberExample: 500
fxConversion.ratenumberExample: 130
fxConversion.rateConventionstringExample: "KES per USD"
fxConversion.sourceMYSTOCKS_MANAGED_FX | PARTNER_PROVIDED_LEGACYfxConversion.asOfstring | nulltypeBUY | SELLquantityintegerlocalPricenumberCurrent price in the stock's local currency.
usdPricenumberCurrent price converted to USD.
grossnumberquantity × usdPrice.
baseFeenumberMyStocks base broker fee (0.75% of gross).
partnerMarkupFeenumberPartner markup component of the fee. Zero if markupBps = 0.
feenumberTotal fee (baseFee + partnerMarkupFee).
feeRatenumberEffective fee rate as a percentage (e.g. 0.75).
totalCostnumberBUY only — gross + fee. The amount escrowed on order submission.
estimatedProceedsnumberSELL only — gross - fee. Estimated wallet credit on settlement.
walletBalancenumberPartner master wallet balance in USD.
sufficientFundsbooleanBUY only — true if walletBalance >= totalCost.
unitsnumberSELL only — units of this stock currently held.
sufficientHoldingsbooleanSELL only — true if units >= quantity.
notestringExample: "This is a quote only. No order has been placed."
Response codes
200Fee quote for the requested symbol, type, and quantity.404Symbol or scoped sub-account not found. Unknown sub-accounts return `SUBACCOUNT_NOT_FOUND` and no quote is created.