Longbridge Developers
Get Started

US Order Detail

Longbridge US Accounts

This method is only available for Longbridge US data-center accounts.

It is not available to accounts in other data centers (such as HK or SG), even when those accounts can trade US symbols. It is also not available to paper accounts (enable_papertrading = true): the Longbridge US desk (US DC) does not provide paper accounts at all, so the entire US region — every US-specific API, not just this one — is unavailable in a paper environment.

Calling it from an unsupported account returns an error rather than an empty result — do not treat the failure as “this order does not exist”. For a paper environment, use an AP account with the generic trade APIs instead.

Get detail for a specific US order — execution history, order status, and any attached child orders.

>_ CLI
# View US order detail
longbridge order detail 701276261045858304

Parameters

SDK method parameters.

NameTypeRequiredDescription
order_idstringYESOrder ID

Request Example

from longbridge.openapi import TradeContext, Config, OAuthBuilder

oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = TradeContext(config)
resp = ctx.us_order_detail("701276261045858304")
print(resp)
import asyncio
from longbridge.openapi import AsyncTradeContext, Config, OAuthBuilder

async def main() -> None:
    oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url))
    config = Config.from_oauth(oauth)
    ctx = AsyncTradeContext.create(config)
    resp = await ctx.us_order_detail("701276261045858304")
    print(resp)

if __name__ == "__main__":
    asyncio.run(main())
const { Config, TradeContext, OAuth } = require('longbridge')

async function main() {
  const oauth = await OAuth.build('your-client-id', (_, url) => {
    console.log('Open this URL to authorize: ' + url)
  })
  const config = Config.fromOAuth(oauth)
  const ctx = TradeContext.new(config)
  const resp = await ctx.usOrderDetail("701276261045858304")
  console.log(resp)
}
main().catch(console.error)
import com.longbridge.*;
import com.longbridge.trade.*;

class Main {
    public static void main(String[] args) throws Exception {
        try (OAuth oauth = new OAuthBuilder("your-client-id").build(url -> System.out.println("Open to authorize: " + url)).get();
             Config config = Config.fromOAuth(oauth);
             TradeContext ctx = TradeContext.create(config)) {
            var resp = ctx.getUsOrderDetail("701276261045858304").get();
            System.out.println(resp);
        }
    }
}
use std::sync::Arc;
use longbridge::{oauth::OAuthBuilder, trade::TradeContext, Config};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("Open: {url}")).await?;
    let config = Arc::new(Config::from_oauth(oauth));
    let ctx = TradeContext::new(config);
    let resp = ctx.us_order_detail("701276261045858304").await?;
    println!("{:?}", resp);
    Ok(())
}
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/longbridge/openapi-go/config"
	"github.com/longbridge/openapi-go/oauth"
	"github.com/longbridge/openapi-go/trade"
)

func main() {
	o := oauth.New("your-client-id").
		OnOpenURL(func(url string) { fmt.Println("Open this URL to authorize:", url) })
	if err := o.Build(context.Background()); err != nil {
		log.Fatal(err)
	}
	conf, err := config.New(config.WithOAuthClient(o))
	if err != nil {
		log.Fatal(err)
	}
	c, err := trade.NewFromCfg(conf)
	if err != nil {
		log.Fatal(err)
	}
	defer c.Close()
	resp, err := c.USOrderDetail(context.Background(), "701276261045858304")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", resp)
}

Response

Response Example

{
  "order": {
    "id": "701276261045858304",
    "symbol": "AAPL.US",
    "action": "Buy",
    "order_type": "LO",
    "status": "Filled",
    "price": "185.00",
    "quantity": "10",
    "executed_qty": "10",
    "executed_price": "184.95",
    "executed_amount": "1849.50",
    "currency": "USD",
    "submitted_at": "1751866334",
    "done_at": "1751866400",
    "time_in_force": 0,
    "msg": ""
  },
  "current_attached_order": null,
  "current_millisecond": "1751866400000"
}

Response Status

StatusDescriptionSchema
200SuccessUSOrderDetailResponse
400Bad requestNone

USOrderDetailResponse

NameTypeRequiredDescription
orderUSOrderDetail | nulltrueFull order detail, null if not found
current_attached_orderUSOrderDetail | nullfalseAttached child order (bracket/OCO)
current_millisecondstringfalseServer timestamp (milliseconds)

USOrderDetail

Core fields (the full response contains 50+ fields for fees, triggers, and settlement details):

NameTypeDescription
idstringOrder ID
symbolstringTrading symbol (e.g. AAPL.US)
actionintDirection: 1=Buy, 2=Sell
order_typestringOrder type
statusstringOrder status
pricestringOrder price
quantitystringOrder quantity
executed_qtystringExecuted quantity
executed_pricestringAverage executed price
executed_amountstringTotal executed amount
currencystringCurrency code
submitted_atstringSubmission time
done_atstringCompletion time
time_in_forceintTime-in-force type
trigger_pricestringTrigger price (stop orders)
msgstringStatus message
order_historiesUSOrderHistory[]Order state-transition history
attached_ordersUSAttachedOrder[]Attached child orders
button_controlUSButtonControlAvailable action buttons
charge_detailUSChargeDetail | nullFee breakdown

USOrderHistory

NameTypeDescription
exec_typeintExecution type
statusstringOrder status at this point
pricestringPrice
qtystringQuantity
timestringTimestamp
msgstringMessage