NexusFi: Find Your Edge


Home Menu

 





am looking for historical data option BTC


Discussion in Options

Updated
    1. trending_up 1,187 views
    2. thumb_up 11 thanks given
    3. group 2 followers
    1. forum 13 posts
    2. attach_file 9 attachments




 
Search this Thread

am looking for historical data option BTC

  #11 (permalink)
 
Hulk's Avatar
 Hulk 
Texas, USA
 
Experience: Advanced
Platform: TT, Custom
Trading: Futures, Spreads
Posts: 369 since May 2014
Thanks Given: 731
Thanks Received: 901

And if you are interested in learning how I did this then read below:

I downloaded the TBBO schema (this is the one you need based on the image you shared) data for BTC options for Dec 30th in the DBN (zstd) format.

Then the following lines of code read the file, apply date formatting and include symbol name and save a CSV copy of the formatted data

 
Code
import databento as db
import pandas as pd

# initialize/authorize your client
client = db.Historical("<API KEY>")

# file that was downloaded from databento.com
file_name = "/home/hulk/Downloads/glbx-mdp3-20221230.tbbo.dbn.zst"

# read the file into memory
stored_data = db.DBNStore.from_file(file_name)

# set pretty_ts, pretty_tx and map_symbols to True to convert into human readable format
df = stored_data.to_df(pretty_ts=True, pretty_px=True, map_symbols=True)

# save data as csv for further processing
df.to_csv("/home/hulk/Downloads/glbx-mdp3-20221230.tbbo.csv")

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
 
  #12 (permalink)
 
Hulk's Avatar
 Hulk 
Texas, USA
 
Experience: Advanced
Platform: TT, Custom
Trading: Futures, Spreads
Posts: 369 since May 2014
Thanks Given: 731
Thanks Received: 901

@diegs

I saw your PM.

You asked:

Quoting 
you can have for example the Ask and Bid for this product at the time frame (2022.12.30) 02:01:00 when a order is passed at 192 ( buy order ) and other at 02:03:23 ( H:mn:sec) with an other buy order ?

I am assuming you are looking for the best bid/ask data at all times.

I have attached 2 files to this message:
  • glbx-mdp3-20221230.BTCF3_C18500.mbp-1.csv: This file has the trades and BBO at all times for the instrument you are interested in.
  • glbx-mdp3-20221230.BTCF3_C18500.mbo.csv: This file has all the trades and all orders in addition to the BBO that were added, cancelled, traded or modified for the entire day for the instrument you are interested in.

The times in columns ts_event and ts_recv are in UTC. Since you didn't mention the timezone, I suggest you first convert your times to UTC and you should be able to find the information you are looking for in these 2 files.

FYI I did not find a bid order at 192 at any time.

Let me know if you have any questions.

Attached Files
Elite Membership required to download: glbx-mdp3-20221230.BTCF3_C18500.mbp-1.csv
Elite Membership required to download: glbx-mdp3-20221230.BTCF3_C18500.mbo.csv
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #13 (permalink)
diegs
lyon france
 
Posts: 7 since Apr 2023
Thanks Given: 0
Thanks Received: 0


Thanks a lot .
My UT zone are in France , i believe its +1 the 30 december . And i think the cotation begin at One o clock this day , so i have just to put+1 in hour .

If it s not abusing , can you explain me one line ( in simple words ) , for example the line 6 . i put it here

ts_recv,ts_event,ts_in_delta,publisher_id,product_id,action,side,depth,flags,price,size,sequence,bid_px_00,ask_px_00,bid_sz_00,ask_sz_00,bid_oq_00,ask_oq_00,symbol


2022-12-30 00:00:28.394960943+00:00,2022-12-30 00:00:28.394846701+00:00,18918,1,74153,M,B,0,128,230.00000000000003,1,1797744,230.00000000000003,320.0,1,6,1,1,BTCF3 C18500

i havent find the signification of depth , and flags .

Attached Files
Elite Membership required to download: trest.txt
Reply With Quote
  #14 (permalink)
 
Hulk's Avatar
 Hulk 
Texas, USA
 
Experience: Advanced
Platform: TT, Custom
Trading: Futures, Spreads
Posts: 369 since May 2014
Thanks Given: 731
Thanks Received: 901


diegs View Post
Thanks a lot .
My UT zone are in France , i believe its +1 the 30 december . And i think the cotation begin at One o clock this day , so i have just to put+1 in hour .

If it s not abusing , can you explain me one line ( in simple words ) , for example the line 6 . i put it here

ts_recv,ts_event,ts_in_delta,publisher_id,product_id,action,side,depth,flags,price,size,sequence,bid_px_00,ask_px_00,bid_sz_00,ask_sz_00,bid_oq_00,ask_oq_00,symbol


2022-12-30 00:00:28.394960943+00:00,2022-12-30 00:00:28.394846701+00:00,18918,1,74153,M,B,0,128,230.00000000000003,1,1797744,230.00000000000003,320.0,1,6,1,1,BTCF3 C18500

i havent find the signification of depth , and flags .

You can ask whatever you want. You are not abusing anything. I am happy to help to the extent I can.

Depth = 0 means that this is the best bid or offer. Databento has another schema called MBP-10. In this schema, the depth will be from 0 to 9 and contain 10 levels of market depth. You are working with the MBP-1 schema that includes only the best bid/offer (depth=0)
Flags = For this file, you can safely ignore the values in this column since it is MBP-1. Flags are important when you are processing MBO data.



You can read more about it here: https://docs.databento.com/knowledge-base/new-users/standards-conventions?historical=python&live=python

Please feel free to ask any more questions.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on April 21, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts