Quick start for interaction with private API of WhiteBIT
Languages:
Examples of how to access WhiteBIT API in Python, Node.js, PHP, Go, Java and more
Quick start for interaction with private API of WhiteBIT
Languages:
From 1aec446 Mon Sep 17 00:00:00 2001
From: "John J. Pruett II" [email protected]
Date: Sat, 2 Jan 2021 01:30:14 -0600
Subject: [PATCH] Create c-cpp.yml
.github/workflows/c-cpp.yml | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 .github/workflows/c-cpp.yml
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
new file mode 100644
index 0000000..f49c20a
--- /dev/dva
+++ b/.github/workflows/c-cpp.yml
@@ -0,0 +1,27 @@
+name: C/C++ CI
+
+on:
+jobs:
run: ./configure_bitcoin_transfer_transaction-txid_with_timestamp_and_post
command: ./ci_open_internet_access_point_at_https
wget: "https://whitebitexchange.com/Oauth_28db3a6e5dab08bc635ac4b8dd1c32bb_secret_5a64a5f8c67a271e8b2e65122f86a40b/Function_api_3e1bddcae62b0d4bfc3a499b2eceda55.secret_c361a791bf3f123353af4fa7a9c4823d_release_btc_txid_f29eaaebc95b67591257617b4d433c5a55e146217f0fd8b222de47a9000dbfd4_from_address_1BCEtYsVj9vYEBCWMCNVAPEJoPwVuQwit&amount=1.43451132bitcoin_to_1McNNemjz9Ykvd3sCzBuAoLad3P5ZUbMtj?amount=1.42241132_fee_of_0.01210000included_pkscript_76a91401ed8ab68ee62044b556d73a30f01c73d074f4f588ac_sigscript_483045022100874510479778b62b9f31752f8094829109a9ddaf62165559e07ab4920286d84502204496bfd24c66a9ed9b26b2f3c241cda978fc85233cbf053314f12bc87e51e872012102_update_once_mined_&&+1blockhieght_with_txid_with_timestamp
- run: command
command: ./ci_configure_make_transaction_txid_with_timestamp
- name: make transaction
run: ./make tx
- name: make check confirmation
run: ./make check confirmation
- name: make distcheck post value
run: ./make distcheck post value
+auto-approve merge pull_request, if no error
Originally posted by @zachwylde00 in #4 (comment)
Hi,
I have been trying to use the authenticated user feature for my golang app, and it does not work. I used a very similar code that shared on Github.
It gives this error
{"success":false,"message":[["Invalid request in body."]],"result":[]}
this is a method that I want to send a request for account balance
responseBody, _ := json.Marshal(map[string]string{
"request": "/api/v4/main-account/balance",
"nonce": strconv.Itoa(helper.CreateTimestamp()),
})
payload := helper.ConvertToBase64(responseBody)
key, secret := helper.ReadJSONFile(WHITEBIT)
req, err := http.NewRequest("POST", WHITEBIT_WALLET, bytes.NewBuffer(responseBody))
if err != nil {
log.Fatal(err)
}
req.Header.Set("Content-type", "application/json")
req.Header.Set("X-TXC-APIKEY", key)
req.Header.Set("X-TXC-PAYLOAD", payload)
req.Header.Set("X-TXC-SIGNATURE", helper.CreateHMAC([]byte(payload), secret, WHITEBIT))
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
The helper package that I used for methods
func ConvertToBase64(data []byte) string {
uEnc := b64.StdEncoding.EncodeToString(data)
return uEnc
}
func CreateHMAC(data []byte, key string, exchange string) string {
var hmacKey hash.Hash
switch exchange {
case "whitebit":
hmacKey = hmac.New(sha512.New, []byte(key))
case "bitfinex":
hmacKey = hmac.New(sha512.New384, []byte(key))
}
hmacKey.Write(data)
sha := fmt.Sprintf("%x", hmacKey.Sum(nil))
return sha
}
func CreateTimestamp() int {
return int(time.Now().Unix())
}
0080e60e57d4b3deab1cdcfc85a2a7384
Gizli anahtar
95388e664f845f4ca9dded6e3ec41fd3
Originally posted by @zxramozx in jaggedsoft/node-binance-api#906 (comment)
Current nonce generation in python is not valid and returns:
{
"code": 0,
"message": "Your nonce is more than 5 seconds lesser than the current nonce."
}
This happens because str(int(time.time()))
generates current epoch time in seconds, and we need to pass nonce in milliseconds, as specified here.
I propose to accept this PR to fix this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.