sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.96k stars 2.19k forks source link

update options base endpoint #1262

Closed ka1myk closed 1 year ago

ka1myk commented 1 year ago

as is: OPTIONS_URL = 'https://vapi.binance.{}/vapi' to be: OPTIONS_URL = 'https://eapi.binance.{}/eapi'

related to https://binance-docs.github.io/apidocs/voptions/en/#change-log

ka1myk commented 1 year ago

workaround

from binance.client import BaseClient
from binance.client import Client
BaseClient.OPTIONS_URL = 'https://eapi.binance.{}/eapi'
with open('variables.json') as v:
    variables = json.load(v)
client = Client(variables['binance_01']['key'], variables['binance_01']['secret'])
print(client.options_exchange_info())