Repository navigation
v0.30.0
Adds US account asset APIs and makes AP-only endpoints fail fast for US accounts.
Added
- US account asset APIs (#135):
TradeContextgainsUSCashAndBuyPower,USAvailableHolding,USTransactionHistoryandUSExchangeRates(US-only). OrderSideUnknown(""): the side of an execution when the response omits it (US history executions).
Changed
FundPositions,MarginRatio,AllExecutions,OrderDetail/OrderDetailAttached,AccountBalance,CashFlow,StockPositionsandPortfolioContext.ExchangeRateare AP-only. With US credentials they now return*http.RegionRestrictedErrorwithout sending the request.RegionRestrictedError.Error()appends; <hint>naming the alternative endpoint. Code that checks the message for exact equality must be updated; prefix matching still works.- New
http.Client.CheckRegionCtx/IsUSCtxresolve the region of an OAuth session.CheckRegion/IsUSare deprecated.
Fixed
- Region guards now work for OAuth sessions. Before, every OAuth session was treated as AP.
USCryptoEntrynow hasQuantity, prices and the other fields it was missing (#135).OptionChainInfoByDatecallsPOST /v1/quote/options/strikes. The old endpoint returned 404 in every region (#134).
Full changelog: v0.29.2...v0.30.0