US Stock Trading
Calculate Order
This endpoint estimates the exact order cost, fees, and trade feasibility for the specified order type before execution.
It supports Market, Limit, and Stop order types and determines the precise values that should be used when placing an actual order.
The values returned guide what to send in the /api/order request.
Integration Flow:
- First, call this endpoint to calculate the order.
- Then, use the order_price from the calculation response as the total_price when placing the order.
- All other response fields (e.g., price_per_share, quantity, fee) must be reused exactly as returned.
Developer Note:
- Multiple example payloads are available below. Please switch to the relevant example (Market, Limit, or Stop) before copying and testing your request.
- Market order calculation requires amount; Limit and Stop order calculation require price_per_share, price, and quantity.
- Recall that Limit/Stop orders are Good Till Canceled (GTC) or the set expiration_date (default of 90 days applies if no expiration is set).
post/api/order/calculate
Request
- Base URLhttps://powered-by-bamboo-sandbox.investbamboo.com
- Authnone declared. Required headers: content-type, accept-language, x-user-id, x-subject-type, x-client-token, x-request-source
Headers
content-typestring required
Advertises which content type is acceptable.
accept-languagestring required
Advertises which languages the tenant is able to understand. For example, 'en' for English Language.
x-user-idstring required
Required for user authentication
x-subject-typestring required
For user request -> 'tenant'.
x-client-tokenstring required
API Consumer Authorisation Token
x-request-sourcestring required
The tenant's username
currencystring
NGN - to order in Naira
Request body
Example request
{
"symbol": "AAPL"
}Response
Calculated order
Example response
{
"quantity": 38.22748653,
"currency_symbol": "$",
"price_per_share": 257.668,
"fee": 150,
"order_price": 9850,
"total_price": 10000
}Changes
No recorded changes to this operation across all 1 revision of this API.