Skip to content

Instantly share code, notes, and snippets.

View websocket_bybit.js
////////////////////// file : ws_bybit.js
// WebSocket Creation
const my_ws = new WebSocket("wss://stream.bybit.com/v5/public/linear");
// event handler : websocket open
my_ws.addEventListener("open", function (event) {
document.write("bybit WebSocket Opened<br>");
my_ws.send('{"op": "subscribe","args": ["publicTrade.BTCUSDT"]}');
View CCy_File_1.mqh
//+------------------------------------------------------------------+
//| CCy_File_1.mqh |
//| igotit |
//| https://igotit.tistory.com |
//+------------------------------------------------------------------+
#property copyright "igotit"
#property link "https://igotit.tistory.com"
#property version "1.00"
#property strict
@igotit-anything
igotit-anything / CCy_Commission_1.mqh
Created March 22, 2023 14:16
MT4 Commission BreakEven Points
View CCy_Commission_1.mqh
//+------------------------------------------------------------------+
//| CCy_Commission_1.mqh |
//| igotit |
//| https://igotit.tistory.com |
//+------------------------------------------------------------------+
#property copyright "igotit"
#property link "https://igotit.tistory.com"
#property version "1.00"
#property strict
@igotit-anything
igotit-anything / bybit_websocket_execution_example.py
Last active July 5, 2022 14:10
bybit_websocket_execution_example.py
View bybit_websocket_execution_example.py
def processing_execution(data_dic_one):
leaves_qty = dic_json.get('leaves_qty')
if leaves_qty > 0 :
return
## 여기 이하 전량체결 이벤트일 때 수행됨.
## 봇에서 주문 낸 지정가 주문(지정가 의도했으나 시장가 체결된것 포함) 이 전량체결 시점임.
_symbol = dic_json.get('symbol')
@igotit-anything
igotit-anything / bybit USDT perpetual real time execution data.py
Last active July 5, 2022 14:10
bybit USDT perpetual real time execution data.py
View bybit USDT perpetual real time execution data.py
################ bybit WebSocket example. USDT perpetual ETHUSDT
import asyncio
import websockets
import json
View bybit_websocketsharp_tls_handshake_error_resolved.cs
using System;
using System.Threading;
using WebSocketSharp;
namespace TestWebSocketSharp
{
class Program
View WebSocketSharp.cs
using System;
using System.Threading;
using WebSocketSharp;
namespace TestWebSocketSharp
{
class Program
{
static void Main(string[] args)
{
View CCyManagerPosi.cpp
//+------------------------------------------------------------------+
//| CyManager_Posi.mqh |
//| igotit |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "igotit"
#property link "https://www.mql5.com"
#property version "1.00"
#include <Trade\PositionInfo.mqh>
View bybit_new_candel.py
import asyncio
import websockets
import json
import time
import hmac
def proc_klineV2_usd(str_json):
View bybit_websocket_multi_connection_by_asyncio.py
import asyncio
import websockets
import json
import time
import hmac