configuration is not returning response
wsrajesh opened this issue · 1 comments
I am working on this version 2 from past 2 days and didn't find out the solution. Could you please look at the code and help me.
As i am new to this.
Thanks in advance.
#%% authentication version 1 for the deribit
importing the dependecies
try:
import pandas as pd
import numpy as np
import openapi_client
from openapi_client.rest import ApiException
print("Modules imported")
except ModuleNotFoundError as err:
print(err)
%% making client
client_id = "" #stars are replaced by orginal data
client_secret = "****************"
username = ""
password = ""
conf = openapi_client.Configuration(host='https://www.deribit.com/api/v2',api_key = client_secret,api_key_prefix="Bearer", username = username, password = password)
%%
conf.debug = True
%%
auth_params = {
'grant_type': 'client_credentials',
'client_id': client_id,
'client_secret': client_secret,
}
import requests
data = requests.get('https://www.deribit.com/api/v2', params= auth_params)
%%
I firstly want to refer to the code examples in https://github.com/deribit/deribit-api-clients/blob/master/README.md. Do those result in an error for you?
Can you otherwise provide a complete code snippet which can reproduce the error you appear to experience in your code? I'm not really sure how to interpret the %%
and code fragments you have submitted in your initial comment.