Coder Social home page Coder Social logo

hollaex-node-lib's People

Contributors

abeikverdi avatar dependabot[bot] avatar fetok12 avatar hbeikverdi avatar kycfeel avatar lvmbdv avatar melvinoost avatar seniorchoi avatar swkoyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hollaex-node-lib's Issues

access API with python request

Hello,
I try to access private API data from Exir platform, which ist a derivate of hollaex. Could you please help me to find, what I
do wrong with my aproach with Python 3.
If I run this, I get the msg "Access Denied: Invalid API Signature" --> something is wrong with my api-signature

the documentation of Exir API is:
https://apidocs.exir.io/#introduction

Thank you

here an example code:

import time
import json
import hmac
import hashlib
import requests
from urllib.parse import urljoin, urlencode

API_KEY = '65e...'
SECRET_KEY = '3c3...'
BASE_URL = 'https://api.exir.io'

timestamp = str(int(time.time()+10))

headers = {
    'api-key': API_KEY,
    'api-expires': timestamp
}

PATH='/v1/user/orders'
params = {"symbol":"btc-irt"}
url = urljoin(BASE_URL, PATH)
string = 'GET/v1/user/orders'+timestamp+str(params)
print(string)
headers['api-signature'] = hmac.new(SECRET_KEY.encode('utf-8'), string.encode('utf-8'), hashlib.sha256).hexdigest()
r = requests.get(url, headers=headers, params=params)
data = r.json()
print(json.dumps(data, indent=2))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.