on a side note, I tried to comment with a python function of the same but for some reason my messages aren't getting posted. I'll try to post it again.
def rs_per_lot(script): global rpl global rpl_ year = script[-8:-6] if year+year in script: #for scripts of pattern ALUJANFE1717JANFUT return rpl_[script[:3]] else: #for scripts of pattern GOLD17FEBFUT return rpl[script[:-8]]
def rs_per_lot(script): global rpl global rpl_ year = script[-8:-6] if year+year in script: #for scripts of pattern ALUJANFE1717JANFUT return rpl_[script[:3]] else: #for scripts of pattern GOLD17FEBFUT return rpl[script[:-8]]
def rs_per_lot(script): global rpl global rpl_ year = script[-8:-6] if year+year in script: #for scripts of pattern ALUJANFE1717JANFUT return rpl_[script[:3]] else: #for scripts of pattern GOLD17FEBFUT return rpl[script[:-8]]
def rs_per_lot(script): global rpl global rpl_ year = script[-8:-6] if year+year in script: #for scripts of pattern ALUJANFE1717JANFUT return rpl_[script[:3]] else: #for scripts of pattern GOLD17FEBFUT return rpl[script[:-8]]
def rs_per_lot(script): global rpl global rpl_ year = script[-8:-6] if year+year in script: #for scripts of pattern ALUJANFE1717JANFUT return rpl_[script[:3]] else: #for scripts of pattern GOLD17FEBFUT return rpl[script[:-8]]
on a side note, I tried to comment with a python function of the same but for some reason my messages aren't getting posted. I'll try to post it again.
rpl = {
'ALUMINI':1000,
'ALUMINIUM':5000,
'BRENTCRUDE':100,
'COPPER':1000,
'COPPERM':250,
'CRUDEOIL':00,
'CRUDEOILMINI':10,
'GOLD':100,
'GOLDGUINEA':1,
'GOLDM':10,
'GOLDGLOBAL':20,
'GOLDPETAL':1,
'GOLDPTLDEL':1,
'LEAD':5000,
'LEADMINI':1000,
'NATURALGAS':1250,
'NICKEL':250,
'NICKELM':100,
'SILVER':30,
'SILVER1000':1,
'SILVERM':5,
'SILVERMIC':1,
'ZINC':5000,
'ZINCMINI':1000,
'CARDAMOM':100,
'COTTON':25,
'CPO':1000,
'KAPAS':200,
'MENTHAOIL':360,
}
rpl_ = {
'CPO':1000,
'LEM':1000,
'NTG':1250,
'ALM':1000,
'LED':5000,
'ZIM':1000,
'ZIN':5000,
'COT':25,
'NIC':250,
'CPP':1000,
'NIM':100
}
def rs_per_lot(script):
global rpl
global rpl_
year = script[-8:-6]
if year+year in script:
#for scripts of pattern ALUJANFE1717JANFUT
return rpl_[script[:3]]
else:
#for scripts of pattern GOLD17FEBFUT
return rpl[script[:-8]]
thanks! I was hoping if kiteconnect had the some api for the same. Never mind though, I wrote a code for the same in python.
rpl = {
'ALUMINI':1000,
'ALUMINIUM':5000,
'BRENTCRUDE':100,
'COPPER':1000,
'COPPERM':250,
'CRUDEOIL':00,
'CRUDEOILMINI':10,
'GOLD':100,
'GOLDGUINEA':1,
'GOLDM':10,
'GOLDGLOBAL':20,
'GOLDPETAL':1,
'GOLDPTLDEL':1,
'LEAD':5000,
'LEADMINI':1000,
'NATURALGAS':1250,
'NICKEL':250,
'NICKELM':100,
'SILVER':30,
'SILVER1000':1,
'SILVERM':5,
'SILVERMIC':1,
'ZINC':5000,
'ZINCMINI':1000,
'CARDAMOM':100,
'COTTON':25,
'CPO':1000,
'KAPAS':200,
'MENTHAOIL':360,
}
rpl_ = {
'CPO':1000,
'LEM':1000,
'NTG':1250,
'ALM':1000,
'LED':5000,
'ZIM':1000,
'ZIN':5000,
'COT':25,
'NIC':250,
'CPP':1000,
'NIM':100
}
def rs_per_lot(script):
global rpl
global rpl_
year = script[-8:-6]
if year+year in script:
#for scripts of pattern ALUJANFE1717JANFUT
return rpl_[script[:3]]
else:
#for scripts of pattern GOLD17FEBFUT
return rpl[script[:-8]]
rpl = {
'ALUMINI':1000,
'ALUMINIUM':5000,
'BRENTCRUDE':100,
'COPPER':1000,
'COPPERM':250,
'CRUDEOIL':00,
'CRUDEOILMINI':10,
'GOLD':100,
'GOLDGUINEA':1,
'GOLDM':10,
'GOLDGLOBAL':20,
'GOLDPETAL':1,
'GOLDPTLDEL':1,
'LEAD':5000,
'LEADMINI':1000,
'NATURALGAS':1250,
'NICKEL':250,
'NICKELM':100,
'SILVER':30,
'SILVER1000':1,
'SILVERM':5,
'SILVERMIC':1,
'ZINC':5000,
'ZINCMINI':1000,
'CARDAMOM':100,
'COTTON':25,
'CPO':1000,
'KAPAS':200,
'MENTHAOIL':360,
}
rpl_ = {
'CPO':1000,
'LEM':1000,
'NTG':1250,
'ALM':1000,
'LED':5000,
'ZIM':1000,
'ZIN':5000,
'COT':25,
'NIC':250,
'CPP':1000,
'NIM':100
}
def rs_per_lot(script):
global rpl
global rpl_
year = script[-8:-6]
if year+year in script:
#for scripts of pattern ALUJANFE1717JANFUT
return rpl_[script[:3]]
else:
#for scripts of pattern GOLD17FEBFUT
return rpl[script[:-8]]
rpl = {
'ALUMINI':1000,
'ALUMINIUM':5000,
'BRENTCRUDE':100,
'COPPER':1000,
'COPPERM':250,
'CRUDEOIL':00,
'CRUDEOILMINI':10,
'GOLD':100,
'GOLDGUINEA':1,
'GOLDM':10,
'GOLDGLOBAL':20,
'GOLDPETAL':1,
'GOLDPTLDEL':1,
'LEAD':5000,
'LEADMINI':1000,
'NATURALGAS':1250,
'NICKEL':250,
'NICKELM':100,
'SILVER':30,
'SILVER1000':1,
'SILVERM':5,
'SILVERMIC':1,
'ZINC':5000,
'ZINCMINI':1000,
'CARDAMOM':100,
'COTTON':25,
'CPO':1000,
'KAPAS':200,
'MENTHAOIL':360,
}
rpl_ = {
'CPO':1000,
'LEM':1000,
'NTG':1250,
'ALM':1000,
'LED':5000,
'ZIM':1000,
'ZIN':5000,
'COT':25,
'NIC':250,
'CPP':1000,
'NIM':100
}
def rs_per_lot(script):
global rpl
global rpl_
year = script[-8:-6]
if year+year in script:
#for scripts of pattern ALUJANFE1717JANFUT
return rpl_[script[:3]]
else:
#for scripts of pattern GOLD17FEBFUT
return rpl[script[:-8]]
rpl = {
'ALUMINI':1000,
'ALUMINIUM':5000,
'BRENTCRUDE':100,
'COPPER':1000,
'COPPERM':250,
'CRUDEOIL':00,
'CRUDEOILMINI':10,
'GOLD':100,
'GOLDGUINEA':1,
'GOLDM':10,
'GOLDGLOBAL':20,
'GOLDPETAL':1,
'GOLDPTLDEL':1,
'LEAD':5000,
'LEADMINI':1000,
'NATURALGAS':1250,
'NICKEL':250,
'NICKELM':100,
'SILVER':30,
'SILVER1000':1,
'SILVERM':5,
'SILVERMIC':1,
'ZINC':5000,
'ZINCMINI':1000,
'CARDAMOM':100,
'COTTON':25,
'CPO':1000,
'KAPAS':200,
'MENTHAOIL':360,
}
rpl_ = {
'CPO':1000,
'LEM':1000,
'NTG':1250,
'ALM':1000,
'LED':5000,
'ZIM':1000,
'ZIN':5000,
'COT':25,
'NIC':250,
'CPP':1000,
'NIM':100
}
def rs_per_lot(script):
global rpl
global rpl_
year = script[-8:-6]
if year+year in script:
#for scripts of pattern ALUJANFE1717JANFUT
return rpl_[script[:3]]
else:
#for scripts of pattern GOLD17FEBFUT
return rpl[script[:-8]]