Skip to content

Instantly share code, notes, and snippets.

View andrewshkovskii's full-sized avatar

Andrei Baryshnikov andrewshkovskii

  • Slovenia
View GitHub Profile
import pybit
import time
import bybitconfig
class CustomWS(pybit.WebSocket):
def _on_message(self, klass, message, *args, **kwargs):
return super(CustomWS, self)._on_message(message)
def _on_close(self, *args, **kwargs):
from time import sleep
import pybit
class CustomWS(pybit.WebSocket):
def _on_message(self, klass, message, *args, **kwargs):
return super(CustomWS, self)._on_message(message)
('ohlc4', '(close+open+low)/3', 6, 11) ===========> 2
('ohlc4', '(high+open+low)/3', 13, 5) ===========> 2
('ohlc4', 'open', 3, 2) ===========> 2
('low', 'ohlc4', 9, 9) ===========> 2
('ohlc4', '(high+open)/2', 12, 13) ===========> 2
('ohlc4', '(high+open)/2', 5, 13) ===========> 2
('ohlc4', 'open', 5, 5) ===========> 2
('low', 'ohlc4', 7, 13) ===========> 2
('ohlc4', 'high', 6, 13) ===========> 2
('close', 'ohlc4', 8, 12) ===========> 2
[{'delay_between_function_start_and_event': '0:00:00.127088',
'func_run_delay': '0:01:41.860350',
'function_start': '2017-01-11T13:46:09.372088Z',
'last_modified': '2017-01-11T13:46:09.000000Z',
'run_count': 47,
'time_since_uploaded': '0:00:00.372088'},
{'delay_between_function_start_and_event': '0:00:00.127942',
'func_run_delay': '0:01:29.650204',
'function_start': '2017-01-11T13:45:57.161942Z',
'last_modified': '2017-01-11T13:45:57.000000Z',
[{'delay_between_function_start_and_event': '0:00:00.656663',
'func_run_delay': '0:00:00.105621',
'function_start': '2017-01-11T13:45:17.945663Z',
'last_modified': '2017-01-11T13:45:17.000000Z',
'run_count': 0,
'time_since_uploaded': '0:00:00.945663'},
{'delay_between_function_start_and_event': '0:00:01.031817',
'func_run_delay': '0:00:49.438079',
'function_start': '2017-01-11T13:45:16.949817Z',
'last_modified': '2017-01-11T13:45:16.000000Z',
[{'delay_between_function_start_and_event': '0:00:00.911491',
'func_run_delay': '0:00:00.100352',
'function_start': '2017-01-11T13:45:17.396491Z',
'last_modified': '2017-01-11T13:45:17.000000Z',
'run_count': 0,
'time_since_uploaded': '0:00:00.396491'},
{'delay_between_function_start_and_event': '0:00:00.656663',
'func_run_delay': '0:00:00.105621',
'function_start': '2017-01-11T13:45:17.945663Z',
'last_modified': '2017-01-11T13:45:17.000000Z',
'image_info': {
'oneOf': [
{
'type': 'object',
'properties': {
'height': {
'type': 'integer',
'minimum': 1
},
'width': {
{
"result": [
{
"company_id": 10231426,
"data": {
"columns": [
{
"technical_operations": [
55,
55,
import urllib.request
from bs4 import BeautifulSoup
def get_hmtl(url):
response = urllib.request.urlopen(url)
return response.read()
def parse(html):
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/declar/company/1/w/
Django Version: 1.8.4
Python Version: 2.7.6
Installed Applications:
(u'django.contrib.admin',