This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import websockets | |
import json | |
import time | |
import hmac | |
def get_args_secret(_api_key, _api_secrete): | |
expires = str(int(round(time.time())+5000))+"000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bybit 에서 발급받은 본인 api key 기록 | |
bybit 에서 발급받은 본인 secrete key 기록. | |
https://api.bybit.com | |
wss://stream.bybit.com/realtime | |
wss://stream.bybit.com/realtime_public | |
wss://stream.bybit.com/realtime_private | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" //for Visual C++ project. | |
#include <iostream> // for std::string | |
/* | |
Json 형식예. | |
{ | |
"ret_code": 0, | |
"ret_msg": "OK", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cpprest/http_client.h> | |
#include <cpprest/filestream.h> | |
#pragma comment(lib, "cpprest141_2_10.LIB") | |
using namespace std; | |
using namespace utility; // Common utilities like string conversions | |
using namespace web; // Common features like URIs. | |
using namespace web::http; // Common HTTP functionality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bybit | |
client = bybit.bybit(test=True, api_key="my api key", api_secret="my secret key") | |
# Get server time | |
print(client.Common.Common_get().result()[0]) | |
# Get Symbol lists | |
print(client.Symbol.Symbol_get().result()[0]["result"][0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################ bybit WebSocket example. | |
import asyncio | |
import websockets | |
import json | |
async def my_loop_WebSocket_bybit(): | |
# 2021.09.04 error websockets version 9.1 only available version 8.1 async with websockets.client.Connect("wss://stream.bybit.com/realtime") as websocket: | |
async with websockets.connect("wss://stream.bybit.com/realtime") as websocket:# OK websockets version 9.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 잔액 조회하기 | |
# | |
import time, base64, hmac, hashlib, requests, json | |
# 발급받은 api키와 시크릿키를 입력한다 | |
apikey = 'ashdflashdfkh.....' | |
secret = 'as;dlflaskdjfjaskldfjlasjflj.....' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 잔액 조회하기 | |
// | |
var crypto = require('crypto'); | |
var request = require('request'); | |
// 발급받은 api키와 시크릿키를 입력한다 | |
var apikey = 'akdhfafheur'; | |
var secret = 'ausdufasffdkljieurueadfjklj'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////// cy_class_bmft5_pack.h | |
#ifndef cy_class_bmft5_pack_h | |
#define cy_class_bmft5_pack_h | |
#include <stdint.h> | |
#include <string.h> // memcpy,NULL, .. | |
#include <stdlib.h> // malloc | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////file : cy_class_bmft5_unpack.h | |
#ifndef cy_class_bmft5_unpack_h | |
#define cy_class_bmft5_unpack_h | |
#include <stdint.h> | |
#include <string.h> // memcpy,NULL, .. | |
#include <stdlib.h> |