Giter Club home page Giter Club logo

crex24.examples's People

crex24.examples's Issues

Status code: 401 {"errorDescription":"Failed to verify request signature."}

Hello. I have been using your code, concretely pythonv2 and node, but both are giving me the error of the title. I was getting errors related to padding with base64 and also with 'bytes' against 'str' format, so I had to make a workaround to solve this. My code to create the key, message and signature with python3 now looks like this:

keybytes = base64.b64encode(secret.encode())
key = base64.b64decode(keybytes)
message = str.encode(path + str(nonce), "utf-8")
hmac= hmac.new(key, message, sha512)
signature = base64.b64encode(hmac.digest()).decode()

I tried many things, like adding and retrieving 'utf-8' in encode() and decode(), tried typing the b64 operations differently, looked into my timestamp by running the code from a VPS, using different python3 versions... If you have any idea I will be happy to listen. It's clearly a base64 issue. Also present in nodejs. What version&environment are you using?

using the js example from the browser results in failed preflight request

OPTIONS https://api.crex24.com/CryptoExchangeService/BotTrade/ReturnBalances 405 ()
localhost/:1 Failed to load https://api.crex24.com/CryptoExchangeService/BotTrade/ReturnBalances: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3006' is therefore not allowed access. The response had HTTP status code 405.

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.