GithubHelp home page GithubHelp logo

api's People

Contributors

digifinex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

api's Issues

when I call order_history by restapi in nodejs

when I call order_history by restapi in nodejs, I sometimes get below error code.

Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: openapi.digifinex.com. is not in the cert's altnames: DNS:*.gridserver.com, DNS:gridserver.com

why I sometimes must get these error code?

I don't exeed Api request frequency.

and it sometimes work well. but it sometimes not work well.

what I must do?

Websocket decode message

How do you decode the websocket data?
Receiving messages like:
"x�\u0004�1\n�0\f���s\u0017��Fj\u0006!(�%S���-<�O��A�:\n[��ja��t�=x\u001f��'\u0000\u0000���\u0004\u0011�"

Creating signature in python does not work

API docs for websocket says to use

sign: CryptoJS.enc.Base64.Stringify(CryptoJS.HmacSHA256(timestamp, secret))

but that is javascript and not Python. How do I create a sign in Pytrhon?

I have tried:

def sign_request(time_stamp, api_secret):
    # Convert the secret key to bytes
    secret_bytes = bytes(api_secret, 'utf-8')
    # Convert the timestamp to bytes
    time_stamp_bytes = bytes(time_stamp, 'utf-8')
    # Compute the HMAC SHA256 hash
    hash_digest = hmac.new(secret_bytes, time_stamp_bytes, digestmod=hashlib.sha256).digest()
    signature_b64 = base64.b64encode(hash_digest).decode()
    return signature_b64

if __name__ == "__main__":
    wstest = websocket.create_connection("wss://openapi.digifinex.com/ws/v1/")
    timestamp = int(time.time() * 1000)
    base64_encoded = sign_request(str(timestamp), apisecret)
    print('{"id":830518, "method":"server.auth", "params":[%s, %i, "%s"]}' % (apiKey, timestamp, base64_encoded))
    wstest.send('{"id":830518, "method":"server.auth", "params":[%s, %i, "%s"]}' % (apiKey, timestamp, base64_encoded))
    msg = zlib.decompress(wstest.recv()).decode('utf-8')
    msg = json.loads(msg)
    print(msg)

but I keep getting the error message:

{"id":830518, "method":"server.auth", "params":[****secret*****, 1679621058689, f0ApW67b67cvja6LOHJF+sUrMYfQTBOvVTEQxK5exkk="]}
{'error': {'code': 1, 'message': 'Invalid parameter'}, 'id': 830518}

How can I fix this? What is Error code: 1?

{code: 10012} 是什么错误?

我调用限价下单的api接口,一直返回 {code: 10012}

10012在错误返回码中没有描述。请问是什么错误?

生成sign的type在哪获取?

对于不同的类型意味着需要生成不同的sign?
这里有个参数type,例子给的是kline,其他参数呢?

Add Fee, Fee Currency, ledger transactions (deposit, withdraw) and all history

Complete API response:

  • Add transaction ID to response.
  • Add fee amount AND fee currency to response.
  • Add ledger transactions (deposit, withdraw) to response.
  • Respond with all history, not just last three days.
  • Paginated with paging and cursor. Paginate on transaction ID. State number of records in page. State the response sort order in documentation.
    This will allow accounting system to get complete data and to also just get the most recent transactions since the last API call.

websocket Garbled code?

websocket receive message , what Charsets?

UTF_8 Message received is : x�<̱
�����eYV�5ݗ�p�\y6����/�Ӿ�!L������� ����,�
ISO_8859_1 Message received is : xÚ<̱
�âºù¥¶eYV�5Ý��p�\y6�áÐ�/çÓ¾�!L�ú±�°½� ÿÿí�,�
US_ASCII Message received is : x�<��
������eYV�5���p�\y6����/����!L������� ����,�
UTF_16 Message received is : 磚㳌넊숰ᒅ㧳똉뚙ᗜ굓ऒ䦤암草꟒瞗꠸縿鲳拶祼㩨㠟䭴㙻Ⴂ緙㥁༷ᮒ꜕㛝ଇ풢ف뀔㬘⨖⁈ᙒ꩏꠺씍࢕殮뙥奖缵�虰鵜礶ᯡ퀟⿧펾蜡䰎缾蒰봃 �Ⰻ

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.