• C#
  • Java
  • VB
  • C++
  • Python
Contact us

Starting with TWS v10.10 and TWS API v10.10 Cryptocurrency support has been added. Cryptocurrency supports historical data, streaming market data and order placement.

Cryptocurrency Trading Permissions

As Cryptocurrency is new for existing accounts, users would have to request Cryptocurrency trading permissions via Client Portal > Settings > Account Settings > Trading Experience & Permissions.
There are no Market Data Subscription requirements for Cryptocurrency.

Contract Definition Example

Please note, that exchange should be "PAXOS" for all Cryptocurrency contracts.

  • Contract contract = new Contract();
    contract.Symbol = "ETH";
    contract.SecType = "CRYPTO";
    contract.Exchange = "PAXOS";
    contract.Currency = "USD";
  • Contract contract = new Contract();
  • Dim contract As Contract = New Contract()
    contract.Symbol = "ETH"
    contract.SecType = "CRYPTO"
    contract.Exchange = "PAXOS"
    contract.Currency = "USD"
  • Contract contract;
    contract.symbol = "BTC";
    contract.secType = "CRYPTO";
    contract.exchange = "PAXOS";
    contract.currency = "USD";
  • 1  contract = Contract();
    2  contract.symbol = "ETH";
    3  contract.secType = "CRYPTO";
    4  contract.currency = "USD";
    5  contract.exchange = "PAXOS";

Streaming Market Data

Cryptocurrency streaming data is requested via reqMktData function for Top Market Data (Level I) and reqMarketDepth function for Market Depth (Level II) data. Please refer to Top Market Data (Level I) page and Market Depth (Level II) page for information.
Not all tick types are supported by Cryptocurrency. Available tick types are listed below.

-   165(Misc. Stats)
-   232(Pl Price)
-   292(Wide_news)
-   293(TradeCount)
-   294(TradeRate)
-   295(VolumeRate)

Historical Market Data

Historical Market Data request is made via reqHistoricalData function. Please visit Historical Bar Data page for reference.
whatToShow field (Historical Data Types) for Cryptocurrency in the Historical Data requests supports "TRADES", "MIDPOINT", "ASK", "BID" and "BID_ASK". You can refer to the Available Data per Product page for reference.

Order Placement

Cryptocurrency supports only Market and Limit Order order types.
TimeInForce (Tif) for Market (MKT) order is only valid value for Cryptocurrency is IOC (Immediate or Cancel).
When placing a BUY MKT order cashQty must be specified.
Limit (LMT) Order supports IOC (Immediate or Cancel) and Minutes Tif. Minutes: Order are canceled if not filled in 5 minutes.
Please review Placing Orders page for order placement information.