- ago
Hello. Does anybody knows what is the symbol for BTC.USD to run a strategy in Interactive Brokers?

I am having problems getting data, it seems IBKR does not recognize the symbol. I was able to do backtesting and optimization but maybe due to the data coming from Yahoo or Alpaca.

Help, please, and happy week!!
0
755
13 Replies

Reply

Bookmark

Sort
- ago
#1
Hola Diego,

You can look up the symbol on Interactive Brokers website, there's a tool for that.

P.S. If you haven't done so consider voting for this feature request to make Symbol Mapping apply to historical providers too as it does for streaming now:

https://www.wealth-lab.com/Discussion/Add-Symbol-Mappings-for-Historical-Providers-7000
1
Cone8
 ( 24.56% )
- ago
#2
Just see Help (F1) > Extensions > Interactive Brokers.
IB covers 4 cryptos only and they're listed there and on IB's site.
1
Cone8
 ( 24.56% )
- ago
#3
That's the correct symbol for IB and it works. Maybe you don't have IB checked as a Historical Provider in the Data Manager?



1
- ago
#4
Thank you for the info. I tryed again with the wright name but it keeps deactivating the strategy. Message is "IBDataProvider: IB request aborted. Could not identify a contract for BTC.USD". IB is on top as my Historic data providers and work fine streaming quotes on strategies even minute-based.
0
Cone8
 ( 24.56% )
- ago
#5
Go to Data Manager > Historic Providers > right click Interactive Brokers and then "Clear Internal Request Tracking Info" and try again.

If that doesn't work...
1. File > Open WealthLab User Data Folder.
2. Close WealthLab
3. In the data folder, open IBContracts.txt and search for the BTC.USD record. If it doesn't look like this, replace it, save.
CODE:
BTC.USD=BTC|USD|CRYPTO|PAXOS||BTC.USD|||0|

1
- ago
#6
I tryed these but did not work either, moreover I get an exception error.

There is a futures contract in CME under the name BRR @CMECRYPTO however I have no idea of how to name it in order to recall data, as BRR is also a stock.
0
Cone8
 ( 24.56% )
- ago
#7
What's the exception?
Are you using WL8 Build 7 and IB Provider Build 6?

Re: BRR
You have to define the contract. In a situation where you use both you need to use different symbols by defining them. The help guide (F1) describes an "explicit" way to do this, but if you're comfortable editing IBContracts.txt you can do it there and restart WL8 afterwards to get the changes.

For example, this would be BRR stock. It's a STK, currency is SGD, and trades on the VALUE exchange.
BRR=BRR|SGD|STK|SMART|VALUE|BRR|||0|

And this would be BRR futures, June '22 contract. It's a FUT, currency is USD, expires 202206, has a contract multiplier = 5, and trades on CMECRYPTO.
BRRM22=BRR|USD|FUT|CMECRYPTO||BRM2|202206||0|5

For more popular futures contracts, you don't need to even create this record if it's defined in the IBFutures.txt file.
1
- ago
#8
Thank you for your help. I tryed it too but I keep getting the message "IBDataProvider: IB request aborted. Could not identify a contract for BTC.USD" (or its futures version). I get the same message when using Alpaca as a broker and provider, I've tryed tens of times. Even in the data manager no IB nor Alpaca either recognize BTC.USD to get historical data.

I am trying to find something else that backtest succesfully with this Boerlinger bands to SMA strategy but only BTC.USD works. Strager thing is that I get the data for backtesting but I get an error message for running the strategy.

Maybe it's Bitcoin's revenge for saying it's not sustainable :-(
0
Cone8
 ( 24.56% )
- ago
#9
On your TWS, click Help > About. What Build is it? (It better be at least 10.12)

Another thing, before you didn't have subscribe for data permissions for cryptos. Now you do. On IB, go to your Account Settings > Market Data Subscriptions click the gear/configuration icon, and then in the Other section make sure you've checked this box -

1
- ago
#10
Hi Cone.

I delayed this development that makes me stuck and continued producing stock-based strategies. Now I return to this one.

With new WL releases there are no exceptions anymore. I still can not trade BTC.USD but it's not a WL problem but an IBKR problem as BTC.USD is not even recognized in my instances of TWS even though I have data and trading permissions. I will get to their support. My TWS version is 10.16.1j. In fact I can not make TWS recognize Bitcoin symbols not even following IB tutorials, I don't know why.
I asked if anyone else was trading crypto using IB as I tried everything.

BTW: thank you very much for your support, I learned a lot about WL and datasets in the process!
0
Cone8
 ( 24.56% )
- ago
#11
Open the IBContracts.txt file and look for a BTC.USD record. Copy and paste it here (it will be interesting to know what was there), then delete that record and save the file. Try again.
1
- ago
#12
I will, after trading hours. In TWS it doesn't work either, maybe it's because I place the symbol BTC.USD directly in Classic TWS, I will ask their support. I never traded crypto.
0
Cone8
 ( 24.56% )
- ago
#13
QUOTE:
In TWS it doesn't work either
okay, then that's the first thing you need to solve!
0

Reply

Bookmark

Sort