crex24.examples's People
crex24.examples's Issues
The PHP example returns null
It does not work for me. I take the PHP code, change the keys, and all I get is NULL
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.