Delta Exchange API in Python

Delta Exchange India Trade API and Ticker in Python:

Trade Futures & Options on Bitcoin and Ether Elevate your F&O trading with 24/7 open markets, efficient margining and INR settlement

Open Online Delta Exchange India Trading Account Fill the Form with Details as Required.

Visit Delta Exchange India


Generate API Key:

For Instructions Follow the Video then go For the Code Input:


CMD:pip install delta-rest-client


import json
from delta_rest_client import DeltaRestClient
config=open('delta.txt','r').read()
config=json.loads(config)
api_key=config['api_key']
api_secret=config['api_secret']


delta_client = DeltaRestClient(
  base_url='https://api.india.delta.exchange',
  api_key=api_key,
  api_secret=api_secret
)
response = delta_client.get_ticker('C-BTC-94400-280425')
print(response['mark_price'])

Get Product ID for Crypto Trading Symbol Using Delta Exchange API in Python:


For Instructions Follow the Video then go For the Code Input:



import json
from delta_rest_client import DeltaRestClient
config=open('delta.txt','r').read()
config=json.loads(config)
api_key=config['api_key']
api_secret=config['api_secret']


delta_client = DeltaRestClient(
  base_url='https://api.india.delta.exchange',
  api_key=api_key,
  api_secret=api_secret
)
response = delta_client.get_ticker('C-BTC-103800-190525')
print(response['product_id'])

How to Place Orders in Delta Exchange using Python API:


For Instructions Follow the Video then go For the Code Input:



import json
from delta_rest_client import DeltaRestClient
from delta_rest_client import OrderType
config=open('delta.txt','r').read()
config=json.loads(config)
api_key=config['api_key']
api_secret=config['api_secret']


delta_client = DeltaRestClient(
  base_url='https://api.india.delta.exchange',
  api_key=api_key,
  api_secret=api_secret
)
response = delta_client.get_ticker('BTCUSD')
product_id=response['product_id']
mark_price=round(float(response['mark_price'])-10,1)
order_response=delta_client.place_order(product_id=product_id,
  side='buy',
  size=1,
  limit_price=mark_price,
  order_type=OrderType.LIMIT)
print(order_response)