Future lot aize

samnpti
How to get future lotsize auto when buy order.
  • rakeshr
    You can fetch lot size detail from the complete instrument list.
  • tahseen

    import pandas as pd
    df = pd.read_csv( "allinstrument_list_file" )
    df = df[(df.instrument_type == 'FUT') & (df.segment == 'NFO-FUT')]
    lot_size_map = dict( zip( df.tradingsymbol, df.lot_size ) )

    lot_size_map[ "TRADINGSYMBOL"] # would return lot size

  • samnpti
    "allinstrument_list_file" means?

    how the csv would be?
  • samnpti
    samnpti edited August 2021
    import pandas as pd

    df = pd.read_csv(r'C:\\Users\\user\\Desktop\\Arbit\\fo_lot.csv')
    # df = pd.DataFrame(df.tradingsymbol,df.lot_size)
    lot_size_map = dict( zip( df.tradingsymbol, df.lot_size ) )
    lot_size = lot_size_map["ACC"]
    print (lot_size)
  • samnpti
    tradingsymbol lot_size
    ACC 500
    ASHOKLEY 4500
    ALKEM 200
    APLLTD 550
    APOLLOHOSP 250
    AUROPHARMA 650
    BERGEPAINT 1100
    AARTIIND 850
    BHEL 10500
    ABFRL 2600
    ADANIENT 1000
    AMBUJACEM 3000


    how to get lot size of ACC? from this .csv file
  • samnpti
    ok thanks it works
This discussion has been closed.