LongPort OpenAPI C++ SDK
Classes | Enumerations
longport::trade Namespace Reference

Classes

class  TradeContext
 Trade context. More...
 
struct  Execution
 Exexution. More...
 
struct  GetHistoryExecutionsOptions
 Options for get histroy executions request. More...
 
struct  GetTodayExecutionsOptions
 Options for get today executions request. More...
 
struct  Order
 Order. More...
 
struct  PushOrderChanged
 Order changed message. More...
 
struct  GetHistoryOrdersOptions
 Options for get history orders request. More...
 
struct  GetTodayOrdersOptions
 Options for get today orders request. More...
 
struct  ReplaceOrderOptions
 Options for replace order request. More...
 
struct  SubmitOrderOptions
 Options for submit order request. More...
 
struct  SubmitOrderResponse
 Response for submit order request. More...
 
struct  CashInfo
 Cash info. More...
 
struct  AccountBalance
 Account balance. More...
 
struct  CashFlow
 Cash flow. More...
 
struct  GetCashFlowOptions
 Options for submit order request. More...
 
struct  GetFundPositionsOptions
 Options for get fund positions request. More...
 
struct  GetStockPositionsOptions
 Options for get stock positions request. More...
 
struct  FundPosition
 Fund position. More...
 
struct  FundPositionChannel
 Fund position channel. More...
 
struct  FundPositionsResponse
 Fund positions response. More...
 
struct  StockPosition
 Stock position. More...
 
struct  StockPositionChannel
 Stock position channel. More...
 
struct  StockPositionsResponse
 Stock positions response. More...
 
struct  MarginRatio
 Margin ratio. More...
 
struct  OrderHistoryDetail
 Order history detail. More...
 
struct  OrderChargeFee
 Order charge fee. More...
 
struct  OrderChargeItem
 Order charge item. More...
 
struct  OrderChargeDetail
 Order charge detail. More...
 
struct  OrderDetail
 Order detail. More...
 
struct  EstimateMaxPurchaseQuantityOptions
 Options for estimate maximum purchase quantity. More...
 
struct  EstimateMaxPurchaseQuantityResponse
 Response for estimate maximum purchase quantity. More...
 

Enumerations

enum class  TopicType { Private }
 Topic type. More...
 
enum class  OrderStatus {
  Unknown , NotReported , ReplacedNotReported , ProtectedNotReported ,
  VarietiesNotReported , Filled , WaitToNew , New ,
  WaitToReplace , PendingReplace , Replaced , PartialFilled ,
  WaitToCancel , PendingCancel , Rejected , Canceled ,
  Expired , PartialWithdrawal
}
 Order status. More...
 
enum class  OrderSide { Unknown , Buy , Sell }
 Order side. More...
 
enum class  OrderType {
  Unknown , LO , ELO , MO ,
  AO , ALO , ODD , LIT ,
  MIT , TSLPAMT , TSLPPCT , TSMAMT ,
  TSMPCT , SLO
}
 Order type. More...
 
enum class  OrderTag {
  Unknown , Normal , LongTerm , Grey ,
  MarginCall , Offline , Creditor , Debtor ,
  NonExercise , AllocatedSub
}
 Order tag. More...
 
enum class  TimeInForceType { Unknown , Day , GoodTilCanceled , GoodTilDate }
 Time in force Type. More...
 
enum class  TriggerStatus { Unknown , Deactive , Active , Released }
 Trigger status. More...
 
enum class  OutsideRTH { Unknown , RTHOnly , AnyTime , Overnight }
 Enable or disable outside regular trading hours. More...
 
enum class  CashFlowDirection { Unknown , Out , In }
 Cash flow direction. More...
 
enum class  BalanceType { Unknown , Cash , Stock , Fund }
 Balance type. More...
 
enum class  CommissionFreeStatus {
  Unknown , None , Calculated , Pending ,
  Ready
}
 Commission-free Status. More...
 
enum class  DeductionStatus {
  Unknown , None , NoData , Pending ,
  Done
}
 Deduction status. More...
 
enum class  ChargeCategoryCode { Unknown , Broker , Third }
 Charge category code. More...
 

Enumeration Type Documentation

◆ BalanceType

Balance type.

Enumerator
Unknown 

Unknown.

Cash 

Cash.

Stock 

Stock.

Fund 

Fund.

◆ CashFlowDirection

Cash flow direction.

Enumerator
Unknown 

Unknown.

Out 

Out.

In 

In.

◆ ChargeCategoryCode

Charge category code.

Enumerator
Unknown 
Broker 
Third 

◆ CommissionFreeStatus

Commission-free Status.

Enumerator
Unknown 
None 
Calculated 
Pending 
Ready 

◆ DeductionStatus

Deduction status.

Enumerator
Unknown 
None 
NoData 
Pending 
Done 

◆ OrderSide

Order side.

Enumerator
Unknown 

Unknown.

Buy 

Buy.

Sell 

Sell.

◆ OrderStatus

Order status.

Enumerator
Unknown 

Unknown.

NotReported 

Not reported.

ReplacedNotReported 

Not reported (Replaced Order)

ProtectedNotReported 

Not reported (Protected Order)

VarietiesNotReported 

Not reported (Conditional Order)

Filled 

Filled.

WaitToNew 

Wait To New.

New 

New.

WaitToReplace 

Wait To Replace.

PendingReplace 

Pending Replace.

Replaced 

Replaced.

PartialFilled 

Partial Filled.

WaitToCancel 

Wait To Cancel.

PendingCancel 

Pending Cancel.

Rejected 

Rejected.

Canceled 

Canceled.

Expired 

Expired.

PartialWithdrawal 

Partial Withdrawal.

◆ OrderTag

Order tag.

Enumerator
Unknown 

Unknown.

Normal 

Normal Order.

LongTerm 

Long term Order.

Grey 

Grey Order.

MarginCall 

Force Selling.

Offline 

OTC.

Creditor 

Option Exercise Long.

Debtor 

Option Exercise Short.

NonExercise 

Wavier Of Option Exercise.

AllocatedSub 

Trade Allocation.

◆ OrderType

Order type.

Enumerator
Unknown 

Unknown.

LO 

Limit Order.

ELO 

Enhanced Limit Order.

MO 

Market Order.

AO 

At-auction Order.

ALO 

At-auction Limit Order.

ODD 

Odd Lots.

LIT 

Limit If Touched.

MIT 

Market If Touched.

TSLPAMT 

Trailing Limit If Touched (Trailing Amount)

TSLPPCT 

Trailing Limit If Touched (Trailing Percent)

TSMAMT 

Trailing Market If Touched (Trailing Amount)

TSMPCT 

Trailing Market If Touched (Trailing Percent)

SLO 

Special Limit Order.

◆ OutsideRTH

Enable or disable outside regular trading hours.

Enumerator
Unknown 

Unknown.

RTHOnly 

Regular trading hour only.

AnyTime 

Any time.

Overnight 

Overnight.

◆ TimeInForceType

Time in force Type.

Enumerator
Unknown 

Unknown.

Day 

Day Order.

GoodTilCanceled 

Good Til Canceled Order.

GoodTilDate 

Good Til Date Order.

◆ TopicType

Topic type.

Enumerator
Private 

Private notification for trade.

◆ TriggerStatus

Trigger status.

Enumerator
Unknown 

Unknown.

Deactive 

Deactive.

Active 

Active.

Released 

Released.