code stringlengths 541 76.7k | apis list | extract_api stringlengths 178 38.5k |
|---|---|---|
#!/usr/bin/env python
import time
import asyncio
import logging
import websockets
import aiohttp
import ujson
from typing import Optional, List, AsyncIterable, Any
from hummingbot.core.data_type.user_stream_tracker_data_source import UserStreamTrackerDataSource
from hummingbot.logger import HummingbotLogger
from hummi... | [
"hummingbot.connector.exchange.ascend_ex.ascend_ex_utils.get_ws_url_private"
] | [((878, 905), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (895, 905), False, 'import logging\n'), ((4343, 4354), 'time.time', 'time.time', ([], {}), '()\n', (4352, 4354), False, 'import time\n'), ((3893, 3912), 'asyncio.sleep', 'asyncio.sleep', (['(30.0)'], {}), '(30.0)\n', (3906, 3912... |
from decimal import Decimal
from unittest import TestCase
from unittest.mock import patch
import pandas as pd
from hummingbot.connector.derivative.position import Position
from hummingbot.connector.exchange.paper_trade.paper_trade_exchange import QuantizationParams
from hummingbot.core.clock import Clock
from humming... | [
"hummingbot.strategy.perpetual_market_making.PerpetualMarketMakingStrategy",
"hummingbot.core.event.events.PositionMode.ONEWAY.name.title",
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple",
"hummingbot.core.clock.Clock",
"hummingbot.strategy.data_types.Proposal",
"hummingbot.core.eve... | [((1264, 1300), 'pandas.Timestamp', 'pd.Timestamp', (['"""2019-01-01"""'], {'tz': '"""UTC"""'}), "('2019-01-01', tz='UTC')\n", (1276, 1300), True, 'import pandas as pd\n'), ((1325, 1370), 'pandas.Timestamp', 'pd.Timestamp', (['"""2019-01-01 01:00:00"""'], {'tz': '"""UTC"""'}), "('2019-01-01 01:00:00', tz='UTC')\n", (13... |
# A single source of truth for constant variables related to the exchange
from hummingbot.core.api_throttler.data_types import RateLimit
EXCHANGE_NAME = "bitmart"
REST_URL = "https://api-cloud.bitmart.com"
REST_URL_HK = "https://api-cloud.bitmart.news"
WSS_URL = "wss://ws-manager-compress.bitmart.com?protocol=1.1"
WS... | [
"hummingbot.core.api_throttler.data_types.RateLimit"
] | [((1066, 1135), 'hummingbot.core.api_throttler.data_types.RateLimit', 'RateLimit', ([], {'limit_id': 'CHECK_NETWORK_PATH_URL', 'limit': '(10)', 'time_interval': '(1)'}), '(limit_id=CHECK_NETWORK_PATH_URL, limit=10, time_interval=1)\n', (1075, 1135), False, 'from hummingbot.core.api_throttler.data_types import RateLimit... |
from hummingbot.core.api_throttler.data_types import RateLimit, LinkedLimitWeightPair
EXCHANGE_NAME = "mexc"
# URLs
MEXC_BASE_URL = "https://www.mexc.com"
MEXC_SYMBOL_URL = '/open/api/v2/market/symbols'
MEXC_TICKERS_URL = '/open/api/v2/market/ticker'
MEXC_DEPTH_URL = '/open/api/v2/market/depth?symbol={trading_pair}&... | [
"hummingbot.core.api_throttler.data_types.LinkedLimitWeightPair",
"hummingbot.core.api_throttler.data_types.RateLimit"
] | [((978, 1066), 'hummingbot.core.api_throttler.data_types.RateLimit', 'RateLimit', ([], {'limit_id': 'HTTP_ENDPOINTS_LIMIT_ID', 'limit': 'HTTP_LIMIT', 'time_interval': 'MINUTE'}), '(limit_id=HTTP_ENDPOINTS_LIMIT_ID, limit=HTTP_LIMIT, time_interval\n =MINUTE)\n', (987, 1066), False, 'from hummingbot.core.api_throttler... |
#!/usr/bin/env python
from os.path import join, realpath
import sys; sys.path.insert(0, realpath(join(__file__, "../../../")))
from decimal import Decimal
import unittest
from hummingbot.market.celo.celo_cli import CeloCLI, CELO_BASE, CELO_QUOTE
celo_address = "0x1640eb9C393630d5BC42Ff3f4e81A07912FC0fdd"
celo_passw... | [
"hummingbot.market.celo.celo_cli.CeloCLI.balances",
"hummingbot.market.celo.celo_cli.CeloCLI.validate_node_synced",
"hummingbot.market.celo.celo_cli.CeloCLI.buy_cgld",
"hummingbot.market.celo.celo_cli.CeloCLI.exchange_rate",
"hummingbot.market.celo.celo_cli.CeloCLI.unlock_account",
"hummingbot.market.celo... | [((98, 125), 'os.path.join', 'join', (['__file__', '"""../../../"""'], {}), "(__file__, '../../../')\n", (102, 125), False, 'from os.path import join, realpath\n'), ((459, 502), 'hummingbot.market.celo.celo_cli.CeloCLI.unlock_account', 'CeloCLI.unlock_account', (['celo_address', '"""XXX"""'], {}), "(celo_address, 'XXX'... |
import asyncio
import unittest
from unittest.mock import MagicMock, patch
from prompt_toolkit.widgets import Button
from hummingbot.client.config.config_helpers import read_system_configs_from_yml
from hummingbot.client.tab.data_types import CommandTab
from hummingbot.client.ui.custom_widgets import CustomTextArea
fr... | [
"hummingbot.client.config.config_helpers.read_system_configs_from_yml",
"hummingbot.client.ui.hummingbot_cli.HummingbotCLI"
] | [((2100, 2143), 'unittest.mock.patch', 'patch', (['"""hummingbot.client.ui.layout.Layout"""'], {}), "('hummingbot.client.ui.layout.Layout')\n", (2105, 2143), False, 'from unittest.mock import MagicMock, patch\n'), ((2149, 2200), 'unittest.mock.patch', 'patch', (['"""hummingbot.client.ui.layout.FloatContainer"""'], {}),... |
from decimal import Decimal
from typing import (
Any,
Dict,
Optional,
)
import asyncio
from hummingbot.core.event.events import (
OrderType,
TradeType
)
from hummingbot.connector.in_flight_order_base import InFlightOrderBase
from hummingbot.connector.exchange.bitmart import bitmart_utils
class Bit... | [
"hummingbot.connector.exchange.bitmart.bitmart_utils.get_ms_timestamp"
] | [((1002, 1017), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (1015, 1017), False, 'import asyncio\n'), ((2364, 2401), 'decimal.Decimal', 'Decimal', (["data['executed_amount_base']"], {}), "(data['executed_amount_base'])\n", (2371, 2401), False, 'from decimal import Decimal\n'), ((2441, 2479), 'decimal.Decimal', ... |
# A single source of truth for constant variables related to the exchange
from binance.client import Client as BinanceClient
from hummingbot.core.api_throttler.data_types import LinkedLimitWeightPair, RateLimit
# Base URL
REST_URL = "https://api.binance.{}/api/"
WSS_URL = "wss://stream.binance.{}:9443/ws"
PUBLIC_API_... | [
"hummingbot.core.api_throttler.data_types.LinkedLimitWeightPair",
"hummingbot.core.api_throttler.data_types.RateLimit"
] | [((1449, 1521), 'hummingbot.core.api_throttler.data_types.RateLimit', 'RateLimit', ([], {'limit_id': 'REQUEST_WEIGHT', 'limit': '(1200)', 'time_interval': 'ONE_MINUTE'}), '(limit_id=REQUEST_WEIGHT, limit=1200, time_interval=ONE_MINUTE)\n', (1458, 1521), False, 'from hummingbot.core.api_throttler.data_types import Linke... |
from decimal import Decimal
from typing import (
Set,
Tuple,
List
)
import psutil
import datetime
import asyncio
from hummingbot.model.trade_fill import TradeFill
from hummingbot.core.utils.market_price import get_last_price
from hummingbot.client.performance import calculate_performance_metrics, smart_roun... | [
"hummingbot.client.performance.smart_round",
"hummingbot.client.hummingbot_application.HummingbotApplication.main_application",
"hummingbot.client.performance.calculate_performance_metrics"
] | [((338, 350), 'decimal.Decimal', 'Decimal', (['"""0"""'], {}), "('0')\n", (345, 350), False, 'from decimal import Decimal\n'), ((826, 842), 'psutil.Process', 'psutil.Process', ([], {}), '()\n', (840, 842), False, 'import psutil\n'), ((1402, 1442), 'hummingbot.client.hummingbot_application.HummingbotApplication.main_app... |
import asyncio
import json
import re
import unittest
from decimal import Decimal
from typing import Awaitable, Dict
from aioresponses import aioresponses
from bidict import bidict
from hummingbot.connector.exchange.binance.binance_api_order_book_data_source import BinanceAPIOrderBookDataSource
from hummingbot.connect... | [
"hummingbot.core.rate_oracle.rate_oracle.RateOracle.get_coingecko_prices",
"hummingbot.core.rate_oracle.rate_oracle.RateOracle.get_binance_prices_by_domain",
"hummingbot.core.rate_oracle.rate_oracle.RateOracle.get_coingecko_prices_by_page",
"hummingbot.core.rate_oracle.rate_oracle.RateOracle.coingecko_usd_pri... | [((2651, 2665), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (2663, 2665), False, 'from aioresponses import aioresponses\n'), ((3396, 3410), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (3408, 3410), False, 'from aioresponses import aioresponses\n'), ((7178, 7192), 'aioresponses.aior... |
#!/usr/bin/env python
import aiohttp
import asyncio
import gzip
import json
import logging
import pandas as pd
import time
from typing import (
Any,
AsyncIterable,
Dict,
List,
Optional,
)
import websockets
from websockets.exceptions import ConnectionClosed
from hummingbot.core.data_type.order_book... | [
"hummingbot.market.huobi.huobi_order_book.HuobiOrderBook.trade_message_from_exchange",
"hummingbot.core.utils.async_ttl_cache",
"hummingbot.market.huobi.huobi_order_book.HuobiOrderBook.diff_message_from_exchange",
"hummingbot.market.huobi.huobi_order_book.HuobiOrderBook.snapshot_message_from_exchange",
"hum... | [((1562, 1601), 'hummingbot.core.utils.async_ttl_cache', 'async_ttl_cache', ([], {'ttl': '(60 * 30)', 'maxsize': '(1)'}), '(ttl=60 * 30, maxsize=1)\n', (1577, 1601), False, 'from hummingbot.core.utils import async_ttl_cache\n'), ((1335, 1362), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n'... |
import asyncio
import unittest
from typing import Awaitable
from unittest.mock import patch, PropertyMock
import aiohttp
from hummingbot.core.web_assistant.auth import AuthBase
from hummingbot.core.web_assistant.connections.data_types import (
WSRequest, WSResponse, RESTRequest
)
from hummingbot.core.web_assistan... | [
"hummingbot.core.web_assistant.connections.data_types.WSResponse",
"hummingbot.core.web_assistant.connections.ws_connection.WSConnection",
"hummingbot.core.web_assistant.ws_assistant.WSAssistant",
"hummingbot.core.web_assistant.connections.data_types.WSRequest"
] | [((1190, 1285), 'unittest.mock.patch', 'patch', (['"""hummingbot.core.web_assistant.connections.ws_connection.WSConnection.connect"""'], {}), "(\n 'hummingbot.core.web_assistant.connections.ws_connection.WSConnection.connect'\n )\n", (1195, 1285), False, 'from unittest.mock import patch, PropertyMock\n'), ((1817,... |
import asyncio
import logging
import math
import sys
import time
import unittest
from typing import Dict, Optional, List
from hummingbot.connector.exchange.bitfinex.bitfinex_order_book_tracker import BitfinexOrderBookTracker
from hummingbot.core.data_type.common import TradeType
from hummingbot.core.data_type.order_bo... | [
"hummingbot.connector.exchange.bitfinex.bitfinex_order_book_tracker.BitfinexOrderBookTracker",
"hummingbot.core.event.event_logger.EventLogger"
] | [((7087, 7126), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (7106, 7126), False, 'import logging\n'), ((7131, 7146), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7144, 7146), False, 'import unittest\n'), ((1179, 1203), 'asyncio.get_event_loop', 'async... |
#!/usr/bin/env python
from os.path import join, realpath
import sys; sys.path.insert(0, realpath(join(__file__, "../../../")))
import asyncio
import logging
from typing import (
Any,
List,
Callable,
Optional,
)
from telegram.bot import Bot
from telegram.parsemode import ParseMode
from telegram.replyke... | [
"hummingbot.core.utils.async_call_scheduler.AsyncCallScheduler.shared_instance",
"hummingbot.client.config.global_config_map.global_config_map.get"
] | [((98, 125), 'os.path.join', 'join', (['__file__', '"""../../../"""'], {}), "(__file__, '../../../')\n", (102, 125), False, 'from os.path import join, realpath\n'), ((2729, 2760), 'telegram.ext.Updater', 'Updater', ([], {'token': 'token', 'workers': '(0)'}), '(token=token, workers=0)\n', (2736, 2760), False, 'from tele... |
import asyncio
import unittest
from typing import Awaitable, Optional
from unittest.mock import AsyncMock, patch
from hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_auth import DydxPerpetualAuth
from hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_client_wrapper import DydxPerpetualClient... | [
"hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_user_stream_data_source.DydxPerpetualUserStreamDataSource",
"hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_auth.DydxPerpetualAuth",
"hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_client_wrapper.DydxPerpetualClientWrap... | [((2580, 2645), 'unittest.mock.patch', 'patch', (['"""aiohttp.ClientSession.ws_connect"""'], {'new_callable': 'AsyncMock'}), "('aiohttp.ClientSession.ws_connect', new_callable=AsyncMock)\n", (2585, 2645), False, 'from unittest.mock import AsyncMock, patch\n'), ((2651, 2796), 'unittest.mock.patch', 'patch', (['"""hummin... |
import re
from dateutil.parser import parse as dateparse
from typing import (
Any,
Dict,
Optional,
Tuple,
)
from hummingbot.core.utils.tracking_nonce import get_tracking_nonce
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_methods import using_exchange
fr... | [
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce",
"hummingbot.client.config.config_methods.using_exchange"
] | [((388, 431), 're.compile', 're.compile', (['Constants.TRADING_PAIR_SPLITTER'], {}), '(Constants.TRADING_PAIR_SPLITTER)\n', (398, 431), False, 'import re\n'), ((985, 1005), 'hummingbot.core.utils.tracking_nonce.get_tracking_nonce', 'get_tracking_nonce', ([], {}), '()\n', (1003, 1005), False, 'from hummingbot.core.utils... |
import asyncio
import time
import unittest
from collections import deque
from typing import (
Deque,
Optional,
Union,
)
import hummingbot.connector.exchange.btcturk.btcturk_constants as CONSTANTS
from hummingbot.connector.exchange.btcturk.btcturk_order_book import BtcturkOrderBook
from hummingbot.connecto... | [
"hummingbot.core.data_type.order_book_message.OrderBookMessage",
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.btcturk.btcturk_order_book.BtcturkOrderBook",
"hummingbot.connector.exchange.btcturk.btcturk_order_book.BtcturkOrderBook.diff_message_from_exchange",
... | [((879, 903), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (901, 903), False, 'import asyncio\n'), ((983, 1020), 'hummingbot.core.api_throttler.async_throttler.AsyncThrottler', 'AsyncThrottler', (['CONSTANTS.RATE_LIMITS'], {}), '(CONSTANTS.RATE_LIMITS)\n', (997, 1020), False, 'from hummingbot.c... |
import asyncio
import logging
import time
from typing import List, Optional
from hummingbot.connector.exchange.ascend_ex import ascend_ex_constants as CONSTANTS
from hummingbot.connector.exchange.ascend_ex.ascend_ex_auth import AscendExAuth
from hummingbot.connector.exchange.ascend_ex.ascend_ex_utils import build_api_... | [
"hummingbot.core.web_assistant.connections.data_types.RESTRequest",
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.ascend_ex.ascend_ex_utils.get_ws_url_private",
"hummingbot.core.web_assistant.connections.data_types.WSRequest",
"hummingbot.connector.exchange.a... | [((4817, 4854), 'hummingbot.core.api_throttler.async_throttler.AsyncThrottler', 'AsyncThrottler', (['CONSTANTS.RATE_LIMITS'], {}), '(CONSTANTS.RATE_LIMITS)\n', (4831, 4854), False, 'from hummingbot.core.api_throttler.async_throttler import AsyncThrottler\n'), ((1245, 1272), 'logging.getLogger', 'logging.getLogger', (['... |
#!/usr/bin/env python
import asyncio
from typing import (
Optional,
List,
)
from hummingbot.core.data_type.user_stream_tracker_data_source import UserStreamTrackerDataSource
from hummingbot.core.data_type.user_stream_tracker import (
UserStreamTracker
)
from hummingbot.core.utils.async_utils import (
s... | [
"hummingbot.core.utils.async_utils.safe_gather",
"hummingbot.connector.exchange.exmo.exmo_api_user_stream_data_source.ExmoAPIUserStreamDataSource"
] | [((1105, 1129), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (1127, 1129), False, 'import asyncio\n'), ((1632, 1753), 'hummingbot.connector.exchange.exmo.exmo_api_user_stream_data_source.ExmoAPIUserStreamDataSource', 'ExmoAPIUserStreamDataSource', ([], {'throttler': 'self._throttler', 'exmo_aut... |
from prompt_toolkit.shortcuts import input_dialog, message_dialog
from prompt_toolkit.styles import Style
from os.path import join, realpath, dirname
import sys; sys.path.insert(0, realpath(join(__file__, "../../../")))
with open(realpath(join(dirname(__file__), '../../VERSION'))) as version_file:
version = versio... | [
"hummingbot.client.config.security.Security.login",
"hummingbot.client.config.security.Security.new_password_required",
"hummingbot.client.config.security.Security.update_secure_config"
] | [((358, 582), 'prompt_toolkit.styles.Style.from_dict', 'Style.from_dict', (["{'dialog': 'bg:#171E2B', 'dialog frame.label': 'bg:#ffffff #000000',\n 'dialog.body': 'bg:#000000 #1CD085', 'dialog shadow': 'bg:#171E2B',\n 'button': 'bg:#000000', 'text-area': 'bg:#000000 #ffffff'}"], {}), "({'dialog': 'bg:#171E2B', 'd... |
import aiohttp
import asyncio
from datetime import datetime
import json
import time
import logging
from collections import defaultdict
from decimal import Decimal
from typing import (
Any,
Dict,
List,
Optional,
AsyncIterable
)
from dateutil.parser import parse as dataparse
from hummingbot.client.co... | [
"hummingbot.core.data_type.cancellation_result.CancellationResult",
"hummingbot.core.data_type.transaction_tracker.TransactionTracker.c_did_timeout_tx",
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce",
"hummingbot.connector.derivative.leverj_perpetual.leverj_perpetual_in_flight_order.LeverjPerpetual... | [((2894, 2904), 'decimal.Decimal', 'Decimal', (['(0)'], {}), '(0)\n', (2901, 2904), False, 'from decimal import Decimal\n'), ((2921, 2935), 'decimal.Decimal', 'Decimal', (['"""nan"""'], {}), "('nan')\n", (2928, 2935), False, 'from decimal import Decimal\n'), ((3829, 3844), 'asyncio.Event', 'asyncio.Event', ([], {}), '(... |
#!/usr/bin/env python
from abc import (
ABCMeta,
abstractmethod
)
import asyncio
import pandas as pd
from typing import (
Callable,
Dict,
List,
)
from hummingbot.core.data_type.order_book import OrderBook
from hummingbot.core.data_type.order_book_tracker_entry import OrderBookTrackerEntry
class ... | [
"hummingbot.core.data_type.order_book.OrderBook"
] | [((443, 454), 'hummingbot.core.data_type.order_book.OrderBook', 'OrderBook', ([], {}), '()\n', (452, 454), False, 'from hummingbot.core.data_type.order_book import OrderBook\n')] |
import asyncio
import unittest
from decimal import Decimal
from typing import Awaitable, Dict
from unittest.mock import patch
from hummingbot.connector.client_order_tracker import ClientOrderTracker
from hummingbot.connector.exchange_base import ExchangeBase
from hummingbot.core.data_type.common import OrderType, Trad... | [
"hummingbot.connector.client_order_tracker.ClientOrderTracker",
"hummingbot.core.data_type.trade_fee.TokenAmount",
"hummingbot.core.event.event_logger.EventLogger",
"hummingbot.core.data_type.in_flight_order.OrderUpdate"
] | [((5928, 6029), 'unittest.mock.patch', 'patch', (['"""hummingbot.connector.client_order_tracker.ClientOrderTracker.CACHED_ORDER_TTL"""', '(0.1)'], {}), "(\n 'hummingbot.connector.client_order_tracker.ClientOrderTracker.CACHED_ORDER_TTL'\n , 0.1)\n", (5933, 6029), False, 'from unittest.mock import patch\n'), ((115... |
import asyncio
import json
from unittest import TestCase
from unittest.mock import AsyncMock, patch
from hummingbot.connector.exchange.bitmart.bitmart_auth import BitmartAuth
import hummingbot.connector.exchange.bitmart.bitmart_constants as CONSTANTS
from hummingbot.connector.exchange.bitmart.bitmart_user_stream_track... | [
"hummingbot.connector.exchange.bitmart.bitmart_user_stream_tracker.BitmartUserStreamTracker",
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.bitmart.bitmart_auth.BitmartAuth"
] | [((1697, 1748), 'unittest.mock.patch', 'patch', (['"""websockets.connect"""'], {'new_callable': 'AsyncMock'}), "('websockets.connect', new_callable=AsyncMock)\n", (1702, 1748), False, 'from unittest.mock import AsyncMock, patch\n'), ((602, 617), 'asyncio.Queue', 'asyncio.Queue', ([], {}), '()\n', (615, 617), False, 'im... |
#!/usr/bin/env python
from os.path import (
join,
realpath
)
import sys; sys.path.insert(0, realpath(join(__file__, "../../../../../")))
from hummingbot.core.event.event_logger import EventLogger
from hummingbot.core.event.events import (
OrderBookEvent
)
import asyncio
import logging
import unittest
from t... | [
"hummingbot.core.utils.async_utils.safe_gather",
"hummingbot.connector.exchange.beaxy.beaxy_order_book_tracker.BeaxyOrderBookTracker",
"hummingbot.core.event.event_logger.EventLogger"
] | [((5612, 5651), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (5631, 5651), False, 'import logging\n'), ((5656, 5671), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5669, 5671), False, 'import unittest\n'), ((109, 142), 'os.path.join', 'join', (['__file_... |
#!/usr/bin/env python
import unittest
import math
import pandas as pd
import time
from decimal import Decimal
from typing import List
from hummingbot.core.clock import (
Clock,
ClockMode,
)
from hummingbot.core.data_type.limit_order import LimitOrder
from hummingbot.core.data_type.order_book import OrderBook
fr... | [
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple",
"hummingbot.core.data_type.order_book_row.OrderBookRow",
"hummingbot.core.clock.Clock",
"hummingbot.core.event.events.OrderBookTradeEvent",
"hummingbot.connector.exchange.paper_trade.paper_trade_exchange.QuantizationParams"
] | [((913, 923), 'decimal.Decimal', 'Decimal', (['(0)'], {}), '(0)\n', (920, 923), False, 'from decimal import Decimal\n'), ((1010, 1046), 'pandas.Timestamp', 'pd.Timestamp', (['"""2019-01-01"""'], {'tz': '"""UTC"""'}), "('2019-01-01', tz='UTC')\n", (1022, 1046), True, 'import pandas as pd\n'), ((1071, 1116), 'pandas.Time... |
from decimal import Decimal
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
validate_int,
validate_bool,
validate_decimal,
)
from hummingbot.client.settings import (
required_exch... | [
"hummingbot.client.settings.required_exchanges.append",
"hummingbot.client.config.global_config_map.using_exchange",
"hummingbot.client.config.config_var.ConfigVar",
"hummingbot.client.config.config_validators.validate_market_trading_pair",
"hummingbot.client.settings.EXAMPLE_PAIRS.get",
"hummingbot.clien... | [((693, 720), 'hummingbot.client.settings.EXAMPLE_PAIRS.get', 'EXAMPLE_PAIRS.get', (['exchange'], {}), '(exchange)\n', (710, 720), False, 'from hummingbot.client.settings import required_exchanges, EXAMPLE_PAIRS\n'), ((1049, 1094), 'hummingbot.client.config.config_validators.validate_market_trading_pair', 'validate_mar... |
import unittest.mock
from decimal import Decimal
import hummingbot.strategy.pure_market_making.start as strategy_start
from hummingbot.connector.exchange_base import ExchangeBase
from hummingbot.core.data_type.common import PriceType
from hummingbot.strategy.pure_market_making.pure_market_making_config_map import (
... | [
"hummingbot.strategy.pure_market_making.start.start",
"hummingbot.connector.exchange_base.ExchangeBase",
"hummingbot.strategy.pure_market_making.pure_market_making_config_map.pure_market_making_config_map.get"
] | [((679, 707), 'test.hummingbot.strategy.assign_config_default', 'assign_config_default', (['c_map'], {}), '(c_map)\n', (700, 707), False, 'from test.hummingbot.strategy import assign_config_default\n'), ((846, 858), 'decimal.Decimal', 'Decimal', (['"""1"""'], {}), "('1')\n", (853, 858), False, 'from decimal import Deci... |
from enum import Enum
from typing import (
Dict,
Tuple,
)
from hummingbot.core.api_throttler.data_types import RateLimit, LinkedLimitWeightPair
class KrakenAPITier(Enum):
"""
Kraken's Private Endpoint Rate Limit Tiers, based on the Account Verification level.
"""
STARTER = "STARTER"
INTERM... | [
"hummingbot.core.api_throttler.data_types.LinkedLimitWeightPair",
"hummingbot.core.api_throttler.data_types.RateLimit"
] | [((2271, 2394), 'hummingbot.core.api_throttler.data_types.RateLimit', 'RateLimit', ([], {'limit_id': 'PUBLIC_ENDPOINT_LIMIT_ID', 'limit': 'PUBLIC_ENDPOINT_LIMIT', 'time_interval': 'PUBLIC_ENDPOINT_LIMIT_INTERVAL'}), '(limit_id=PUBLIC_ENDPOINT_LIMIT_ID, limit=PUBLIC_ENDPOINT_LIMIT,\n time_interval=PUBLIC_ENDPOINT_LIM... |
import math
import unittest
from hummingbot.client.performance_analysis import PerformanceAnalysis
class TestPerformanceAnalysis(unittest.TestCase):
def test_basic_one_ex(self):
""" Test performance analysis on a one exchange balance. """
performance_analysis = PerformanceAnalysis()
perf... | [
"hummingbot.client.performance_analysis.PerformanceAnalysis"
] | [((3537, 3552), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3550, 3552), False, 'import unittest\n'), ((286, 307), 'hummingbot.client.performance_analysis.PerformanceAnalysis', 'PerformanceAnalysis', ([], {}), '()\n', (305, 307), False, 'from hummingbot.client.performance_analysis import PerformanceAnalysis\n'... |
from os.path import join, realpath
import sys
import asyncio
import conf
import contextlib
import logging
import os
import time
from typing import List
import unittest
from decimal import Decimal
from hummingbot.core.clock import Clock, ClockMode
from hummingbot.core.event.event_logger import EventLogger
from humming... | [
"hummingbot.core.clock.Clock",
"hummingbot.core.event.event_logger.EventLogger",
"hummingbot.connector.exchange.vitex.vitex_exchange.VitexExchange"
] | [((4972, 5011), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (4991, 5011), False, 'import logging\n'), ((5016, 5031), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5029, 5031), False, 'import unittest\n'), ((582, 609), 'os.path.join', 'join', (['__file_... |
from decimal import Decimal
from unittest import TestCase
from unittest.mock import MagicMock, patch
from hummingbot.core.data_type.trade_fee import TradeFeeSchema
from hummingbot.core.utils.fixed_rate_source import FixedRateSource
from hummingbot.strategy.amm_arb.data_types import (
ArbProposalSide,
ArbPropos... | [
"hummingbot.core.data_type.trade_fee.TradeFeeSchema",
"hummingbot.core.utils.fixed_rate_source.FixedRateSource",
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple",
"hummingbot.strategy.amm_arb.data_types.ArbProposal"
] | [((606, 617), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (615, 617), False, 'from unittest.mock import MagicMock, patch\n'), ((645, 656), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (654, 656), False, 'from unittest.mock import MagicMock, patch\n'), ((1031, 1097), 'hummingbot.strategy.marke... |
from typing import (
List,
Tuple,
)
from hummingbot.strategy.market_trading_pair_tuple import MarketTradingPairTuple
from hummingbot.strategy.order_book_asset_price_delegate import OrderBookAssetPriceDelegate
from hummingbot.strategy.api_asset_price_delegate import APIAssetPriceDelegate
from hummingbot.strateg... | [
"hummingbot.strategy.perpetual_market_making.PerpetualMarketMakingStrategy",
"hummingbot.connector.exchange.paper_trade.create_paper_trade_market",
"hummingbot.strategy.perpetual_market_making.perpetual_market_making_config_map.perpetual_market_making_config_map.get",
"hummingbot.strategy.market_trading_pair_... | [((4566, 4597), 'hummingbot.strategy.perpetual_market_making.PerpetualMarketMakingStrategy', 'PerpetualMarketMakingStrategy', ([], {}), '()\n', (4595, 4597), False, 'from hummingbot.strategy.perpetual_market_making import PerpetualMarketMakingStrategy\n'), ((742, 763), 'hummingbot.strategy.perpetual_market_making.perpe... |
# DISABLE SELECT PYLINT TESTS
# pylint: disable=bad-continuation, no-member, no-name-in-module, too-many-function-args
# pylint: disable=too-many-branches, broad-except, too-many-locals
# pylint: disable=too-many-nested-blocks, too-many-statements
"""
╔════════════════════════════════════════════════════╗
║ ╔═╗╦═╗╔═╗... | [
"hummingbot.connector.exchange.graphene.graphene_constants.GrapheneConstants"
] | [((1878, 1903), 'hummingbot.connector.exchange.graphene.graphene_constants.GrapheneConstants', 'GrapheneConstants', (['domain'], {}), '(domain)\n', (1895, 1903), False, 'from hummingbot.connector.exchange.graphene.graphene_constants import GrapheneConstants\n'), ((1928, 1967), 'metanode.graphene_metanode_client.Graphen... |
# DISABLE SELECT PYLINT TESTS
# pylint: disable=bad-continuation, broad-except, no-member, too-many-lines
# pylint: disable=no-name-in-module, too-many-arguments, too-many-public-methods
# pylint: disable=too-many-locals, too-many-instance-attributes, import-error
# pylint: disable=too-many-statements, useless-super-de... | [
"hummingbot.core.data_type.cancellation_result.CancellationResult",
"hummingbot.connector.time_synchronizer.TimeSynchronizer",
"hummingbot.core.data_type.in_flight_order.TradeUpdate",
"hummingbot.core.data_type.in_flight_order.InFlightOrder",
"hummingbot.connector.exchange.graphene.graphene_user_stream_trac... | [((4713, 4731), 'hummingbot.connector.time_synchronizer.TimeSynchronizer', 'TimeSynchronizer', ([], {}), '()\n', (4729, 4731), False, 'from hummingbot.connector.time_synchronizer import TimeSynchronizer\n'), ((4969, 4993), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (4991, 4993), False, 'impor... |
import aiohttp
from aioresponses import aioresponses
import json
import re
import unittest
import asyncio
from typing import (
AsyncIterable,
Awaitable,
Dict,
)
from unittest.mock import patch, AsyncMock
from hummingbot.connector.exchange.kucoin.kucoin_api_order_book_data_source import (
KucoinAPIOrder... | [
"hummingbot.connector.exchange.kucoin.kucoin_api_order_book_data_source.KucoinWSConnectionIterator",
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.kucoin.kucoin_api_order_book_data_source.KucoinAPIOrderBookDataSource.get_last_traded_prices",
"hummingbot.connect... | [((2054, 2068), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (2066, 2068), False, 'from aioresponses import aioresponses\n'), ((2371, 2385), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (2383, 2385), False, 'from aioresponses import aioresponses\n'), ((3018, 3090), 'unittest.mock.pat... |
import asyncio
import re
import ujson
import unittest
from aioresponses import aioresponses
from typing import Awaitable, Optional
from unittest.mock import AsyncMock, patch
from hummingbot.connector.exchange.crypto_com import crypto_com_constants as CONSTANTS
from hummingbot.connector.exchange.crypto_com import cryp... | [
"hummingbot.connector.exchange.crypto_com.crypto_com_utils.get_rest_url",
"hummingbot.connector.exchange.crypto_com.crypto_com_utils.convert_to_exchange_trading_pair",
"hummingbot.connector.exchange.crypto_com.crypto_com_api_order_book_data_source.CryptoComAPIOrderBookDataSource"
] | [((2445, 2459), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (2457, 2459), False, 'from aioresponses import aioresponses\n'), ((3316, 3330), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (3328, 3330), False, 'from aioresponses import aioresponses\n'), ((4056, 4070), 'aioresponses.aior... |
#!/usr/bin/env python
import asyncio
from decimal import Decimal
import aiohttp
import logging
# import pandas as pd
# import math
import requests
import cachetools.func
from typing import AsyncIterable, Dict, List, Optional, Any
import time
import ujson
import websockets
from websockets.exceptions import Connecti... | [
"hummingbot.core.data_type.order_book.OrderBook",
"hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_order_book.DydxPerpetualOrderBook.snapshot_message_from_exchange",
"hummingbot.connector.derivative.dydx_perpetual.dydx_perpetual_order_book.DydxPerpetualOrderBook.diff_message_from_exchange",
"hum... | [((1628, 1643), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (1641, 1643), False, 'import asyncio\n'), ((4979, 5044), 'requests.get', 'requests.get', ([], {'url': 'f"""{DYDX_V3_API_URL}{TICKER_URL}/{trading_pair}"""'}), "(url=f'{DYDX_V3_API_URL}{TICKER_URL}/{trading_pair}')\n", (4991, 5044), False, 'import reque... |
import aiohttp
import asyncio
import logging
import time
import ujson
import websockets
import hummingbot.connector.derivative.binance_perpetual.constants as CONSTANTS
from typing import (
Any,
AsyncIterable,
Dict,
Optional,
Tuple,
)
from websockets import ConnectionClosed
from hummingbot.connect... | [
"hummingbot.connector.derivative.binance_perpetual.binance_perpetual_utils.rest_url",
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.derivative.binance_perpetual.binance_perpetual_utils.wss_url"
] | [((1587, 1624), 'hummingbot.core.api_throttler.async_throttler.AsyncThrottler', 'AsyncThrottler', (['CONSTANTS.RATE_LIMITS'], {}), '(CONSTANTS.RATE_LIMITS)\n', (1601, 1624), False, 'from hummingbot.core.api_throttler.async_throttler import AsyncThrottler\n'), ((935, 962), 'logging.getLogger', 'logging.getLogger', (['__... |
import asyncio
import time
from decimal import Decimal
from typing import List, Dict
import unittest
from hummingbot.client.performance_analysis import PerformanceAnalysis
from hummingbot.core.event.events import TradeFee, OrderType
from hummingbot.core.utils.exchange_rate_conversion import ExchangeRateConversion
from ... | [
"hummingbot.model.trade_fill.TradeFill.timestamp.desc",
"hummingbot.core.utils.async_utils.safe_gather",
"hummingbot.client.performance_analysis.PerformanceAnalysis",
"hummingbot.model.sql_connection_manager.SQLConnectionManager",
"hummingbot.model.trade_fill.TradeFill",
"hummingbot.core.utils.exchange_ra... | [((2898, 2961), 'hummingbot.model.sql_connection_manager.SQLConnectionManager', 'SQLConnectionManager', (['SQLConnectionType.TRADE_FILLS'], {'db_path': '""""""'}), "(SQLConnectionType.TRADE_FILLS, db_path='')\n", (2918, 2961), False, 'from hummingbot.model.sql_connection_manager import SQLConnectionManager, SQLConnecti... |
import asyncio
import json
import unittest
from collections import Awaitable
from typing import Dict, List
from unittest.mock import AsyncMock, patch
from hummingbot.connector.exchange.coinbase_pro.coinbase_pro_api_user_stream_data_source import (
CoinbaseProAPIUserStreamDataSource
)
from hummingbot.connector.exch... | [
"hummingbot.connector.exchange.coinbase_pro.coinbase_pro_api_user_stream_data_source.CoinbaseProAPIUserStreamDataSource",
"hummingbot.connector.exchange.coinbase_pro.coinbase_pro_auth.CoinbaseProAuth",
"hummingbot.connector.exchange.coinbase_pro.coinbase_pro_utils.build_coinbase_pro_web_assistant_factory"
] | [((4035, 4107), 'unittest.mock.patch', 'patch', (['"""aiohttp.client.ClientSession.ws_connect"""'], {'new_callable': 'AsyncMock'}), "('aiohttp.client.ClientSession.ws_connect', new_callable=AsyncMock)\n", (4040, 4107), False, 'from unittest.mock import AsyncMock, patch\n'), ((4893, 4965), 'unittest.mock.patch', 'patch'... |
import asyncio
import json
import unittest
from typing import Awaitable
import aiohttp
from aioresponses import aioresponses
from hummingbot.core.web_assistant.connections.rest_connection import RESTConnection
from hummingbot.core.web_assistant.connections.data_types import RESTMethod, RESTRequest, RESTResponse
cla... | [
"hummingbot.core.web_assistant.connections.data_types.RESTRequest",
"hummingbot.core.web_assistant.connections.rest_connection.RESTConnection"
] | [((676, 690), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (688, 690), False, 'from aioresponses import aioresponses\n'), ((463, 487), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (485, 487), False, 'import asyncio\n'), ((897, 920), 'aiohttp.ClientSession', 'aiohttp.ClientSess... |
import unittest
from prompt_toolkit.styles import Style
from unittest.mock import patch
from hummingbot.client.ui.style import load_style, reset_style, hex_to_ansi
class StyleTest(unittest.TestCase):
class ConfigVar:
value = None
default = None
def __init__(self, value, default=None):
... | [
"hummingbot.client.ui.style.load_style",
"hummingbot.client.ui.style.hex_to_ansi",
"hummingbot.client.ui.style.reset_style"
] | [((392, 438), 'unittest.mock.patch', 'patch', (['"""hummingbot.client.ui.style.is_windows"""'], {}), "('hummingbot.client.ui.style.is_windows')\n", (397, 438), False, 'from unittest.mock import patch\n'), ((2543, 2589), 'unittest.mock.patch', 'patch', (['"""hummingbot.client.ui.style.is_windows"""'], {}), "('hummingbot... |
import random
import string
from typing import Tuple
from hummingbot.core.utils.tracking_nonce import get_tracking_nonce_low_res
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_methods import using_exchange
from hummingbot.core.utils.tracking_nonce import get_tracking_non... | [
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce",
"hummingbot.client.config.config_methods.using_exchange",
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce_low_res"
] | [((743, 771), 'hummingbot.core.utils.tracking_nonce.get_tracking_nonce_low_res', 'get_tracking_nonce_low_res', ([], {}), '()\n', (769, 771), False, 'from hummingbot.core.utils.tracking_nonce import get_tracking_nonce_low_res\n'), ((807, 885), 'random.choice', 'random.choice', (['(string.ascii_uppercase + string.ascii_l... |
import asyncio
import re
import ujson
import unittest
import hummingbot.connector.exchange.binance.binance_constants as CONSTANTS
import hummingbot.connector.exchange.binance.binance_utils as utils
from aioresponses.core import aioresponses
from typing import (
Any,
Dict,
List,
)
from unittest.mock import... | [
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.binance.binance_utils.public_rest_url",
"hummingbot.connector.exchange.binance.binance_api_order_book_data_source.BinanceAPIOrderBookDataSource._get_throttler_instance",
"hummingbot.connector.exchange.binance.binanc... | [((3725, 3739), 'aioresponses.core.aioresponses', 'aioresponses', ([], {}), '()\n', (3737, 3739), False, 'from aioresponses.core import aioresponses\n'), ((4512, 4526), 'aioresponses.core.aioresponses', 'aioresponses', ([], {}), '()\n', (4524, 4526), False, 'from aioresponses.core import aioresponses\n'), ((4532, 4637)... |
from decimal import Decimal
from hummingbot.strategy.market_trading_pair_tuple import MarketTradingPairTuple
from hummingbot.strategy.bigspread_trade.bigspread_trade import BigspreadTradeStrategy
from hummingbot.strategy.bigspread_trade.bigspread_trade_config_map import bigspread_trade_config_map
def start(self):
... | [
"hummingbot.strategy.bigspread_trade.bigspread_trade_config_map.bigspread_trade_config_map.get",
"hummingbot.strategy.bigspread_trade.bigspread_trade.BigspreadTradeStrategy",
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple"
] | [((2087, 2173), 'hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple', 'MarketTradingPairTuple', (['self.markets[spot_connector]', 'spot_market', 'base_1', 'quote_1'], {}), '(self.markets[spot_connector], spot_market, base_1,\n quote_1)\n', (2109, 2173), False, 'from hummingbot.strategy.market_tradi... |
#!/usr/bin/env python
import asyncio
from os.path import join, dirname
import logging
import argparse
from eth_account.local import LocalAccount
import pandas as pd
import platform
import re
from six import string_types
from typing import (
List,
Dict,
Optional,
Tuple,
Any,
Set,
Callable,
)... | [
"hummingbot.cli.ui.parser.load_parser",
"hummingbot.cli.utils.wallet_setup.create_and_save_wallet",
"hummingbot.cli.utils.wallet_setup.unlock_wallet",
"hummingbot.cli.config.global_config_map.global_config_map.values",
"hummingbot.cli.config.in_memory_config_map.in_memory_config_map.get",
"hummingbot.cli.... | [((2971, 2995), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (2993, 2995), False, 'import asyncio\n'), ((3042, 3059), 'hummingbot.cli.ui.parser.load_parser', 'load_parser', (['self'], {}), '(self)\n', (3053, 3059), False, 'from hummingbot.cli.ui.parser import load_parser, ThrowingArgumentParser... |
import asyncio
import json
from unittest import TestCase
from unittest.mock import AsyncMock, patch
from typing import Dict, Any, Awaitable
from aioresponses import aioresponses
from hummingbot.connector.exchange.ascend_ex.ascend_ex_auth import AscendExAuth
from hummingbot.connector.exchange.ascend_ex.ascend_ex_user_... | [
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.ascend_ex.ascend_ex_auth.AscendExAuth"
] | [((1930, 1944), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (1942, 1944), False, 'from aioresponses import aioresponses\n'), ((1950, 2022), 'unittest.mock.patch', 'patch', (['"""aiohttp.client.ClientSession.ws_connect"""'], {'new_callable': 'AsyncMock'}), "('aiohttp.client.ClientSession.ws_connect', ... |
#!/usr/bin/env python
import aiohttp
import asyncio
from aiohttp.test_utils import TestClient
import logging
import pandas as pd
import time
from typing import (
Any,
AsyncIterable,
Dict,
List,
Optional
)
import websockets
from websockets.exceptions import ConnectionClosed
from hummingbot.core.dat... | [
"hummingbot.core.data_type.order_book_tracker_entry.OrderBookTrackerEntry"
] | [((1367, 1382), 'asyncio.Queue', 'asyncio.Queue', ([], {}), '()\n', (1380, 1382), False, 'import asyncio\n'), ((1432, 1447), 'asyncio.Queue', 'asyncio.Queue', ([], {}), '()\n', (1445, 1447), False, 'import asyncio\n'), ((959, 986), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (976, 986)... |
#! /usr/bin/env python
import asyncio
import logging
import os
import sys; sys.path.insert(0, os.path.realpath(os.path.join(__file__, '../../../')))
import time
import unittest
from collections import namedtuple
from decimal import Decimal
from typing import (Any, Dict, List,)
import pandas as pd
from hummingbot.co... | [
"hummingbot.core.data_type.cancellation_result.CancellationResult",
"hummingbot.market.ocean.ocean_api_order_book_data_source.OceanAPIOrderBookDataSource",
"hummingbot.market.ocean.ocean_in_flight_order.OceanInFlightOrder",
"hummingbot.market.ocean.ocean_order_book.OceanOrderBook.snapshot_message_from_exchang... | [((1358, 1382), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (1380, 1382), False, 'import asyncio\n'), ((23953, 24024), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'level', 'format': 'log_format', 'datefmt': '"""%H:%M:%S"""'}), "(level=level, format=log_format, datefmt='%H:%M:%... |
# A single source of truth for constant variables related to the exchange
from hummingbot.core.api_throttler.data_types import LinkedLimitWeightPair, RateLimit
EXCHANGE_NAME = "gate_io"
REST_URL = "https://api.gateio.ws/api/v4"
REST_URL_AUTH = "/api/v4"
WS_URL = "wss://api.gateio.ws/ws/v4/"
HBOT_BROKER_ID = "hummingbo... | [
"hummingbot.core.api_throttler.data_types.LinkedLimitWeightPair",
"hummingbot.core.api_throttler.data_types.RateLimit"
] | [((1764, 1838), 'hummingbot.core.api_throttler.data_types.RateLimit', 'RateLimit', ([], {'limit_id': 'PUBLIC_URL_POINTS_LIMIT_ID', 'limit': '(900)', 'time_interval': '(1)'}), '(limit_id=PUBLIC_URL_POINTS_LIMIT_ID, limit=900, time_interval=1)\n', (1773, 1838), False, 'from hummingbot.core.api_throttler.data_types import... |
import asyncio
import json
import re
import time
import unittest
from collections import Awaitable
from decimal import Decimal
from functools import partial
from typing import Dict
from aioresponses import aioresponses
from hummingbot.connector.exchange.kucoin.kucoin_exchange import KucoinExchange, KUCOIN_ROOT_API
fro... | [
"hummingbot.connector.exchange.kucoin.kucoin_exchange.KucoinExchange"
] | [((3835, 3849), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (3847, 3849), False, 'from aioresponses import aioresponses\n'), ((4187, 4201), 'aioresponses.aioresponses', 'aioresponses', ([], {}), '()\n', (4199, 4201), False, 'from aioresponses import aioresponses\n'), ((4505, 4519), 'aioresponses.aior... |
import base64
import os
import socket
from collections import namedtuple
from hashlib import md5
from typing import Callable, Dict, Optional, Tuple
from zero_ex.order_utils import Order as ZeroExOrder
from hummingbot.connector.time_synchronizer import TimeSynchronizer
from hummingbot.core.utils.tracking_nonce import ... | [
"hummingbot.core.web_assistant.web_assistants_factory.WebAssistantsFactory",
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce_low_res"
] | [((618, 688), 'collections.namedtuple', 'namedtuple', (['"""TradeFillOrderDetails"""', '"""market exchange_trade_id symbol"""'], {}), "('TradeFillOrderDetails', 'market exchange_trade_id symbol')\n", (628, 688), False, 'from collections import namedtuple\n'), ((1489, 1514), 'zero_ex.order_utils.Order', 'ZeroExOrder', (... |
import os
import socket
from typing import Any, Dict
import hummingbot.connector.exchange.btcturk.btcturk_constants as CONSTANTS
from hummingbot.client.config.config_methods import using_exchange
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.core.utils.tracking_nonce import get_tracking_no... | [
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce",
"hummingbot.client.config.config_methods.using_exchange"
] | [((1140, 1160), 'hummingbot.core.utils.tracking_nonce.get_tracking_nonce', 'get_tracking_nonce', ([], {}), '()\n', (1158, 1160), False, 'from hummingbot.core.utils.tracking_nonce import get_tracking_nonce\n'), ((3271, 3296), 'hummingbot.client.config.config_methods.using_exchange', 'using_exchange', (['"""btcturk"""'],... |
from decimal import Decimal
from typing import Any, Dict
from hummingbot.client.config.config_methods import using_exchange
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.core.data_type.trade_fee import TradeFeeSchema
CENTRALIZED = True
EXAMPLE_PAIR = "ZRX-ETH"
DEFAULT_FEES = TradeFeeSchem... | [
"hummingbot.client.config.config_methods.using_exchange"
] | [((353, 369), 'decimal.Decimal', 'Decimal', (['"""0.001"""'], {}), "('0.001')\n", (360, 369), False, 'from decimal import Decimal\n'), ((401, 417), 'decimal.Decimal', 'Decimal', (['"""0.001"""'], {}), "('0.001')\n", (408, 417), False, 'from decimal import Decimal\n'), ((1066, 1091), 'hummingbot.client.config.config_met... |
#!/usr/bin/env python
from os.path import join, realpath
import sys; sys.path.insert(0, realpath(join(__file__, "../../../")))
import logging
import unittest
import asyncio
import uuid
from pprint import pformat
from urllib.parse import urljoin
import aiohttp
from eth_account.signers.local import LocalAccount
fro... | [
"hummingbot.connector.exchange.idex.idex_auth.IdexAuth"
] | [((19124, 19163), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (19143, 19163), False, 'import logging\n'), ((19168, 19183), 'unittest.main', 'unittest.main', ([], {}), '()\n', (19181, 19183), False, 'import unittest\n'), ((98, 125), 'os.path.join', 'join', (['... |
from decimal import Decimal
import pandas as pd
import threading
from typing import (
TYPE_CHECKING,
List,
)
from datetime import datetime
from hummingbot.core.utils.async_utils import safe_ensure_future
from hummingbot.client.config.security import Security
from hummingbot.user.user_balances import UserBalance... | [
"hummingbot.core.utils.market_price.usd_value",
"hummingbot.user.user_balances.UserBalances.connect_market",
"hummingbot.client.config.security.Security.api_keys",
"hummingbot.client.performance.calculate_performance_metrics",
"hummingbot.client.command.history_command.get_timestamp"
] | [((733, 745), 'decimal.Decimal', 'Decimal', (['"""0"""'], {}), "('0')\n", (740, 745), False, 'from decimal import Decimal\n'), ((1509, 1559), 'hummingbot.user.user_balances.UserBalances.connect_market', 'UserBalances.connect_market', (['"""binance"""'], {}), "('binance', **api_keys)\n", (1536, 1559), False, 'from hummi... |
import logging
from typing import Optional
from hummingbot.connector.exchange.kraken.kraken_api_user_stream_data_source import KrakenAPIUserStreamDataSource
from hummingbot.connector.exchange.kraken.kraken_auth import KrakenAuth
from hummingbot.core.api_throttler.async_throttler import AsyncThrottler
from hummingbot.c... | [
"hummingbot.connector.exchange.kraken.kraken_api_user_stream_data_source.KrakenAPIUserStreamDataSource",
"hummingbot.core.utils.async_utils.safe_gather"
] | [((935, 962), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (952, 962), False, 'import logging\n'), ((1603, 1692), 'hummingbot.connector.exchange.kraken.kraken_api_user_stream_data_source.KrakenAPIUserStreamDataSource', 'KrakenAPIUserStreamDataSource', (['self._throttler', 'self._kraken_... |
import unittest
import numpy as np
from hummingbot.strategy.__utils__.trailing_indicators.instant_volatility import InstantVolatilityIndicator
class InstantVolatilityTest(unittest.TestCase):
INITIAL_RANDOM_SEED = 3141592653
BUFFER_LENGTH = 10000
def setUp(self) -> None:
np.random.seed(self.INITIA... | [
"hummingbot.strategy.__utils__.trailing_indicators.instant_volatility.InstantVolatilityIndicator"
] | [((294, 334), 'numpy.random.seed', 'np.random.seed', (['self.INITIAL_RANDOM_SEED'], {}), '(self.INITIAL_RANDOM_SEED)\n', (308, 334), True, 'import numpy as np\n'), ((467, 553), 'numpy.random.normal', 'np.random.normal', (['original_price', '(volatility * original_price)', 'self.BUFFER_LENGTH'], {}), '(original_price, v... |
import re
import math
from typing import Dict, List
from hummingbot.core.utils.tracking_nonce import get_tracking_nonce, get_tracking_nonce_low_res
from hummingbot.connector.exchange.wazirx import wazirx_constants as CONSTANTS
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config... | [
"hummingbot.client.config.config_methods.using_exchange",
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce",
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce_low_res"
] | [((387, 427), 're.compile', 're.compile', (['"""^(\\\\w+)(btc|usdt|inr|wrx)$"""'], {}), "('^(\\\\w+)(btc|usdt|inr|wrx)$')\n", (397, 427), False, 'import re\n'), ((1085, 1113), 'hummingbot.core.utils.tracking_nonce.get_tracking_nonce_low_res', 'get_tracking_nonce_low_res', ([], {}), '()\n', (1111, 1113), False, 'from hu... |
#!/usr/bin/env python
import asyncio
from datetime import datetime
import aiohttp
import logging
from typing import AsyncIterable, Dict, List, Optional, Any
import time
import ujson
import websockets
from websockets.exceptions import ConnectionClosed
from hummingbot.connector.exchange.dydx.dydx_order_book import Dydx... | [
"hummingbot.connector.exchange.dydx.dydx_active_order_tracker.DydxActiveOrderTracker",
"hummingbot.core.data_type.order_book.OrderBook",
"hummingbot.connector.exchange.dydx.dydx_api_token_configuration_data_source.DydxAPITokenConfigurationDataSource.create",
"hummingbot.connector.exchange.dydx.dydx_order_book... | [((1961, 1976), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (1974, 1976), False, 'import asyncio\n'), ((2226, 2274), 'hummingbot.connector.exchange.dydx.dydx_active_order_tracker.DydxActiveOrderTracker', 'DydxActiveOrderTracker', (['self.token_configuration'], {}), '(self.token_configuration)\n', (2248, 2274), ... |
#!/usr/bin/env python
from os.path import (
join,
realpath,
)
import sys; sys.path.insert(0, realpath(join(__file__, "../../")))
import logging; logging.basicConfig(level=logging.ERROR)
import asyncio
import time
import unittest
from decimal import Decimal
from hummingbot.data_feed.data_feed_base import DataFe... | [
"hummingbot.core.utils.exchange_rate_conversion.ExchangeRateConversion.set_global_exchange_rate_config",
"hummingbot.core.utils.exchange_rate_conversion.ExchangeRateConversion.get_instance",
"hummingbot.core.utils.exchange_rate_conversion.ExchangeRateConversion.set_update_interval"
] | [((153, 193), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.ERROR'}), '(level=logging.ERROR)\n', (172, 193), False, 'import logging\n'), ((1804, 1828), 'asyncio.new_event_loop', 'asyncio.new_event_loop', ([], {}), '()\n', (1826, 1828), False, 'import asyncio\n'), ((3610, 3625), 'unittest.main', ... |
import unittest
from copy import deepcopy
from hummingbot.client.settings import AllConnectorSettings
from hummingbot.strategy.dev_5_vwap.dev_5_vwap_config_map import (
dev_5_vwap_config_map,
order_percent_of_volume_prompt,
symbol_prompt,
)
class VwapConfigMapTest(unittest.TestCase):
@classmethod
... | [
"hummingbot.strategy.dev_5_vwap.dev_5_vwap_config_map.symbol_prompt",
"hummingbot.strategy.dev_5_vwap.dev_5_vwap_config_map.order_percent_of_volume_prompt",
"hummingbot.client.settings.AllConnectorSettings.get_example_pairs"
] | [((497, 528), 'copy.deepcopy', 'deepcopy', (['dev_5_vwap_config_map'], {}), '(dev_5_vwap_config_map)\n', (505, 528), False, 'from copy import deepcopy\n'), ((950, 965), 'hummingbot.strategy.dev_5_vwap.dev_5_vwap_config_map.symbol_prompt', 'symbol_prompt', ([], {}), '()\n', (963, 965), False, 'from hummingbot.strategy.d... |
import logging
from decimal import Decimal
import asyncio
import aiohttp
from typing import Dict, Any, List, Optional
import json
import time
import ssl
import copy
from hummingbot.logger.struct_logger import METRICS_LOG_LEVEL
from hummingbot.core.utils import async_ttl_cache
from hummingbot.core.network_iterator impor... | [
"hummingbot.core.utils.tracking_nonce.get_tracking_nonce",
"hummingbot.core.utils.async_ttl_cache",
"hummingbot.connector.connector.uniswap.uniswap_in_flight_order.UniswapInFlightOrder",
"hummingbot.core.utils.ethereum.check_transaction_exceptions",
"hummingbot.core.utils.ethereum.fetch_trading_pairs",
"h... | [((1489, 1501), 'decimal.Decimal', 'Decimal', (['"""0"""'], {}), "('0')\n", (1496, 1501), False, 'from decimal import Decimal\n'), ((1518, 1532), 'decimal.Decimal', 'Decimal', (['"""nan"""'], {}), "('nan')\n", (1525, 1532), False, 'from decimal import Decimal\n'), ((1533, 1577), 'logging.basicConfig', 'logging.basicCon... |
#!/usr/bin/env python
import aiohttp
import aiohttp.client_ws
import asyncio
import json
import logging
import pandas as pd
import time
from typing import (
Any,
AsyncIterable,
Dict,
List,
Optional,
)
from websockets.exceptions import ConnectionClosed
from hummingbot.connector.exchange.mexc import ... | [
"hummingbot.connector.exchange.mexc.mexc_utils.microseconds",
"hummingbot.connector.exchange.mexc.constants.MEXC_DEPTH_URL.format",
"hummingbot.connector.exchange.mexc.mexc_order_book.MexcOrderBook.trade_message_from_exchange",
"hummingbot.connector.exchange.mexc.mexc_utils.convert_to_exchange_trading_pair",
... | [((4781, 4827), 'hummingbot.connector.exchange.mexc.mexc_utils.convert_to_exchange_trading_pair', 'convert_to_exchange_trading_pair', (['trading_pair'], {}), '(trading_pair)\n', (4813, 4827), False, 'from hummingbot.connector.exchange.mexc.mexc_utils import convert_from_exchange_trading_pair, convert_to_exchange_tradin... |
#!/usr/bin/env python
import asyncio
import aiohttp
import logging
import pandas as pd
from typing import (
Any,
AsyncIterable,
Dict,
List,
Optional,
)
import time
import ujson
import websockets
from websockets.exceptions import ConnectionClosed
from hummingbot.core.data_type.order_book import Ord... | [
"hummingbot.connector.exchange.eterbase.eterbase_order_book.EterbaseOrderBook.snapshot_message_from_exchange",
"hummingbot.core.utils.async_ttl_cache",
"hummingbot.connector.exchange.eterbase.eterbase_active_order_tracker.EterbaseActiveOrderTracker",
"hummingbot.connector.exchange.eterbase.eterbase_utils.conv... | [((2169, 2208), 'hummingbot.core.utils.async_ttl_cache', 'async_ttl_cache', ([], {'ttl': '(60 * 30)', 'maxsize': '(1)'}), '(ttl=60 * 30, maxsize=1)\n', (2184, 2208), False, 'from hummingbot.core.utils import async_ttl_cache\n'), ((1386, 1413), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n'... |
import asyncio
import json
from typing import Awaitable
from unittest import TestCase
from unittest.mock import patch, AsyncMock
import hummingbot.connector.exchange.ndax.ndax_constants as CONSTANTS
from hummingbot.connector.exchange.ndax.ndax_api_user_stream_data_source import NdaxAPIUserStreamDataSource
from hummin... | [
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler",
"hummingbot.connector.exchange.ndax.ndax_auth.NdaxAuth",
"hummingbot.connector.exchange.ndax.ndax_api_user_stream_data_source.NdaxAPIUserStreamDataSource"
] | [((3157, 3222), 'unittest.mock.patch', 'patch', (['"""aiohttp.ClientSession.ws_connect"""'], {'new_callable': 'AsyncMock'}), "('aiohttp.ClientSession.ws_connect', new_callable=AsyncMock)\n", (3162, 3222), False, 'from unittest.mock import patch, AsyncMock\n'), ((5471, 5536), 'unittest.mock.patch', 'patch', (['"""aiohtt... |
from hummingbot.client.config.config_var import ConfigVar
# Returns a market prompt that incorporates the connector value set by the user
def market_prompt() -> str:
connector = volume_generation_config_map.get("connector").value
return f'Enter the token trading pair on {connector} >>> '
# List of paramete... | [
"hummingbot.client.config.config_var.ConfigVar"
] | [((404, 469), 'hummingbot.client.config.config_var.ConfigVar', 'ConfigVar', ([], {'key': '"""strategy"""', 'prompt': '""""""', 'default': '"""volume_generation"""'}), "(key='strategy', prompt='', default='volume_generation')\n", (413, 469), False, 'from hummingbot.client.config.config_var import ConfigVar\n'), ((552, 6... |
import asyncio
import functools
from decimal import Decimal
from typing import Awaitable, Callable, Optional
from unittest import TestCase
from unittest.mock import AsyncMock
from hummingbot.connector.exchange.ftx.ftx_exchange import FtxExchange
from hummingbot.core.event.event_logger import EventLogger
from hummingbo... | [
"hummingbot.connector.exchange.ftx.ftx_exchange.FtxExchange",
"hummingbot.core.event.event_logger.EventLogger"
] | [((1058, 1073), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (1071, 1073), False, 'import asyncio\n'), ((1099, 1204), 'hummingbot.connector.exchange.ftx.ftx_exchange.FtxExchange', 'FtxExchange', ([], {'ftx_api_key': '"""testAPIKey"""', 'ftx_secret_key': '"""testSecret"""', 'trading_pairs': '[self.trading_pair]'}... |
#!/usr/bin/env python
import aiohttp
import asyncio
import pandas as pd
import random
import time
from typing import (
NamedTuple,
List,
Dict,
Optional
)
from hummingbot.core.utils.async_utils import safe_gather
shared_client_session: Optional[aiohttp.ClientSession] = None
class FetchTask(NamedTuple... | [
"hummingbot.core.utils.async_utils.safe_gather"
] | [((2073, 2097), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (2095, 2097), False, 'import asyncio\n'), ((467, 496), 'random.randint', 'random.randint', (['(0)', '(4294967295)'], {}), '(0, 4294967295)\n', (481, 496), False, 'import random\n'), ((783, 806), 'aiohttp.ClientSession', 'aiohttp.Clien... |
from hummingbot.strategy.market_trading_pair_tuple import MarketTradingPairTuple
from hummingbot.strategy.follow_leader import FollowLeader
from hummingbot.strategy.follow_leader.follow_leader_config_map import follow_leader_config_map as c_map
def start(self):
market_pairs = c_map.get("market_pairs").value.split... | [
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple",
"hummingbot.strategy.follow_leader.FollowLeader",
"hummingbot.strategy.follow_leader.follow_leader_config_map.follow_leader_config_map.get"
] | [((906, 957), 'hummingbot.strategy.follow_leader.FollowLeader', 'FollowLeader', (['markets', 'duration_seconds', 'batch_size'], {}), '(markets, duration_seconds, batch_size)\n', (918, 957), False, 'from hummingbot.strategy.follow_leader import FollowLeader\n'), ((419, 448), 'hummingbot.strategy.follow_leader.follow_lea... |
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
validate_decimal
)
from hummingbot.client.settings import (
required_exchanges,
EXAMPLE_PAIRS,
)
from decimal import Decimal
from typing... | [
"hummingbot.client.settings.required_exchanges.append",
"hummingbot.client.config.config_var.ConfigVar",
"hummingbot.client.config.config_validators.validate_market_trading_pair",
"hummingbot.client.settings.EXAMPLE_PAIRS.get"
] | [((491, 542), 'hummingbot.client.config.config_validators.validate_market_trading_pair', 'validate_market_trading_pair', (['primary_market', 'value'], {}), '(primary_market, value)\n', (519, 542), False, 'from hummingbot.client.config.config_validators import validate_exchange, validate_market_trading_pair, validate_de... |
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
validate_decimal,
)
from hummingbot.client.settings import (
required_exchanges,
EXAMPLE_PAIRS,
)
from typing import Optional
def tr... | [
"hummingbot.client.settings.required_exchanges.append",
"hummingbot.client.config.config_var.ConfigVar",
"hummingbot.client.config.config_validators.validate_market_trading_pair",
"hummingbot.client.settings.EXAMPLE_PAIRS.get",
"hummingbot.client.config.config_validators.validate_decimal"
] | [((414, 439), 'hummingbot.client.settings.EXAMPLE_PAIRS.get', 'EXAMPLE_PAIRS.get', (['market'], {}), '(market)\n', (431, 439), False, 'from hummingbot.client.settings import required_exchanges, EXAMPLE_PAIRS\n'), ((850, 893), 'hummingbot.client.config.config_validators.validate_market_trading_pair', 'validate_market_tr... |
import logging
import math
import time
import asyncio
import aiohttp
from decimal import Decimal
from typing import Optional, List, Dict, Any, AsyncIterable
from async_timeout import timeout
from hummingbot.connector.exchange_base import ExchangeBase, s_decimal_NaN
from hummingbot.connector.trading_rule import Tradi... | [
"hummingbot.connector.exchange.idex.idex_user_stream_tracker.IdexUserStreamTracker",
"hummingbot.core.data_type.cancellation_result.CancellationResult",
"hummingbot.connector.exchange.idex.idex_resolve.get_throttler",
"hummingbot.connector.exchange.idex.idex_order_book_tracker.IdexOrderBookTracker",
"hummin... | [((1861, 1875), 'decimal.Decimal', 'Decimal', (['"""0.0"""'], {}), "('0.0')\n", (1868, 1875), False, 'from decimal import Decimal\n'), ((50283, 50322), 'hummingbot.core.utils.async_ttl_cache', 'async_ttl_cache', ([], {'ttl': '(60 * 10)', 'maxsize': '(1)'}), '(ttl=60 * 10, maxsize=1)\n', (50298, 50322), False, 'from hum... |
#!/usr/bin/env python
import asyncio
import logging
from typing import (
Optional
)
from hummingbot.core.data_type.user_stream_tracker_data_source import UserStreamTrackerDataSource
from hummingbot.logger import HummingbotLogger
from hummingbot.core.data_type.user_stream_tracker import UserStreamTracker
from hummi... | [
"hummingbot.core.utils.async_utils.safe_gather",
"hummingbot.connector.exchange.dexfin.dexfin_api_user_stream_data_source.DexfinAPIUserStreamDataSource"
] | [((1152, 1176), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (1174, 1176), False, 'import asyncio\n'), ((869, 896), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (886, 896), False, 'import logging\n'), ((1459, 1521), 'hummingbot.connector.exchange.dexfin.dexfin_a... |
import asyncio
import logging
import unittest
from typing import Optional, List, Dict
from hummingbot.connector.derivative.binance_perpetual.binance_perpetual_order_book_tracker import \
BinancePerpetualOrderBookTracker
from hummingbot.core.data_type.common import TradeType
from hummingbot.core.data_type.order_boo... | [
"hummingbot.core.utils.async_utils.safe_gather",
"hummingbot.core.event.event_logger.EventLogger",
"hummingbot.connector.derivative.binance_perpetual.binance_perpetual_order_book_tracker.BinancePerpetualOrderBookTracker"
] | [((4049, 4088), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (4068, 4088), False, 'import logging\n'), ((4093, 4108), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4106, 4108), False, 'import unittest\n'), ((947, 971), 'asyncio.get_event_loop', 'asyncio... |
from decimal import Decimal
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
validate_bool,
validate_decimal,
validate_int
)
from hummingbot.client.settings import (
required_excha... | [
"hummingbot.client.settings.required_exchanges.append",
"hummingbot.client.settings.AllConnectorSettings.get_example_pairs",
"hummingbot.client.config.config_var.ConfigVar",
"hummingbot.client.config.config_validators.validate_market_trading_pair",
"hummingbot.client.config.config_validators.validate_decima... | [((859, 904), 'hummingbot.client.config.config_validators.validate_market_trading_pair', 'validate_market_trading_pair', (['exchange', 'value'], {}), '(exchange, value)\n', (887, 904), False, 'from hummingbot.client.config.config_validators import validate_exchange, validate_market_trading_pair, validate_bool, validate... |
import logging
import asyncio
from decimal import Decimal
from functools import lru_cache
import pandas as pd
from typing import List, Dict, Tuple, Optional, Callable, cast
from hummingbot.client.performance import PerformanceMetrics
from hummingbot.client.settings import AllConnectorSettings
from hummingbot.connector... | [
"hummingbot.client.settings.AllConnectorSettings.get_gateway_evm_amm_connector_names",
"hummingbot.client.performance.PerformanceMetrics.smart_round",
"hummingbot.connector.gateway_price_shim.GatewayPriceShim.get_instance",
"hummingbot.core.rate_oracle.rate_oracle.RateOracle.get_instance",
"hummingbot.strat... | [((1382, 1392), 'decimal.Decimal', 'Decimal', (['(0)'], {}), '(0)\n', (1389, 1392), False, 'from decimal import Decimal\n'), ((6651, 6672), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(10)'}), '(maxsize=10)\n', (6660, 6672), False, 'from functools import lru_cache\n'), ((3120, 3132), 'decimal.Decimal', 'Decim... |
#!/usr/bin/env python
from os.path import join, realpath
import sys; sys.path.insert(0, realpath(join(__file__, "../../")))
import pandas as pd
import unittest
from decimal import Decimal
import asyncio
from hummingsim.backtest.backtest_market import BacktestMarket
from hummingsim.backtest.market import Quantization... | [
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple",
"hummingbot.core.data_type.order_book_row.OrderBookRow",
"hummingbot.core.clock.Clock",
"hummingbot.script.script_iterator.ScriptIterator",
"hummingbot.core.event.events.OrderBookTradeEvent"
] | [((953, 989), 'pandas.Timestamp', 'pd.Timestamp', (['"""2019-01-01"""'], {'tz': '"""UTC"""'}), "('2019-01-01', tz='UTC')\n", (965, 989), True, 'import pandas as pd\n'), ((1014, 1059), 'pandas.Timestamp', 'pd.Timestamp', (['"""2019-01-01 01:00:00"""'], {'tz': '"""UTC"""'}), "('2019-01-01 01:00:00', tz='UTC')\n", (1026, ... |
import asyncio
import unittest
from decimal import Decimal
from hummingbot.connector.exchange.ascend_ex.ascend_ex_exchange import (
AscendExExchange,
AscendExTradingRule,
AscendExCommissionType,
)
from hummingbot.core.event.events import OrderType, TradeType
class TestAscendExExchange(unittest.TestCase):... | [
"hummingbot.connector.exchange.ascend_ex.ascend_ex_exchange.AscendExExchange"
] | [((422, 446), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (444, 446), False, 'import asyncio\n'), ((737, 828), 'hummingbot.connector.exchange.ascend_ex.ascend_ex_exchange.AscendExExchange', 'AscendExExchange', (['self.api_key', 'self.api_secret_key'], {'trading_pairs': '[self.trading_pair]'}),... |
import logging
from decimal import Decimal
from typing import List, Tuple, Union
from hummingbot.core.remote_control.remote_command_executor import RemoteCommandExecutor
from hummingbot.core.event.event_forwarder import SourceInfoEventForwarder
from hummingbot.core.event.events import (
RemoteEvent,
RemoteCmdE... | [
"hummingbot.core.event.event_forwarder.SourceInfoEventForwarder",
"hummingbot.core.remote_control.remote_command_executor.RemoteCommandExecutor.get_instance"
] | [((450, 460), 'decimal.Decimal', 'Decimal', (['(0)'], {}), '(0)\n', (457, 460), False, 'from decimal import Decimal\n'), ((1230, 1274), 'hummingbot.core.event.event_forwarder.SourceInfoEventForwarder', 'SourceInfoEventForwarder', (['self.on_remote_cmd'], {}), '(self.on_remote_cmd)\n', (1254, 1274), False, 'from humming... |
import asyncio
import logging
import time
from typing import (
Dict,
Optional,
Tuple,
)
import hummingbot.connector.exchange.binance.binance_constants as CONSTANTS
from hummingbot.connector.exchange.binance import binance_utils
from hummingbot.connector.exchange.binance.binance_auth import BinanceAuth
fro... | [
"hummingbot.connector.exchange.binance.binance_utils.private_rest_url",
"hummingbot.connector.exchange.binance.binance_constants.WSS_URL.format",
"hummingbot.connector.utils.build_api_factory",
"hummingbot.core.api_throttler.async_throttler.AsyncThrottler"
] | [((1986, 2001), 'asyncio.Event', 'asyncio.Event', ([], {}), '()\n', (1999, 2001), False, 'import asyncio\n'), ((4311, 4348), 'hummingbot.core.api_throttler.async_throttler.AsyncThrottler', 'AsyncThrottler', (['CONSTANTS.RATE_LIMITS'], {}), '(CONSTANTS.RATE_LIMITS)\n', (4325, 4348), False, 'from hummingbot.core.api_thro... |
from unittest import TestCase
from hummingbot.connector.exchange.coinzoom.coinzoom_auth import CoinzoomAuth
class CoinzoomAuthTests(TestCase):
def setUp(self) -> None:
super().setUp()
self._api_key = 'testApiKey'
self._secret_key = 'testSecretKey'
self._username = 'testUserName'
... | [
"hummingbot.connector.exchange.coinzoom.coinzoom_auth.CoinzoomAuth"
] | [((341, 435), 'hummingbot.connector.exchange.coinzoom.coinzoom_auth.CoinzoomAuth', 'CoinzoomAuth', ([], {'api_key': 'self._api_key', 'secret_key': 'self._secret_key', 'username': 'self._username'}), '(api_key=self._api_key, secret_key=self._secret_key, username=\n self._username)\n', (353, 435), False, 'from humming... |
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_methods import using_exchange
import zlib
CENTRALIZED = True
EXAMPLE_PAIR = "BTC-USDT"
DEFAULT_FEES = [0.1, 0.15]
KEYS = {
"okex_api_key":
ConfigVar(key="okex_api_key",
prompt="Enter your... | [
"hummingbot.client.config.config_methods.using_exchange"
] | [((1208, 1243), 'zlib.decompressobj', 'zlib.decompressobj', (['(-zlib.MAX_WBITS)'], {}), '(-zlib.MAX_WBITS)\n', (1226, 1243), False, 'import zlib\n'), ((371, 393), 'hummingbot.client.config.config_methods.using_exchange', 'using_exchange', (['"""okex"""'], {}), "('okex')\n", (385, 393), False, 'from hummingbot.client.c... |
import pandas as pd
from unittest import TestCase
from unittest.mock import patch
from hummingbot.connector.derivative.bybit_perpetual import bybit_perpetual_constants as CONSTANTS, bybit_perpetual_utils as utils
class BybitPerpetualUtilsTests(TestCase):
@patch('hummingbot.connector.derivative.bybit_perpetual.b... | [
"hummingbot.connector.derivative.bybit_perpetual.bybit_perpetual_utils.get_next_funding_timestamp",
"hummingbot.connector.derivative.bybit_perpetual.bybit_perpetual_constants.REST_URLS.get",
"hummingbot.connector.derivative.bybit_perpetual.bybit_perpetual_constants.WSS_LINEAR_PRIVATE_URLS.get",
"hummingbot.co... | [((264, 371), 'unittest.mock.patch', 'patch', (['"""hummingbot.connector.derivative.bybit_perpetual.bybit_perpetual_utils.get_tracking_nonce"""'], {}), "(\n 'hummingbot.connector.derivative.bybit_perpetual.bybit_perpetual_utils.get_tracking_nonce'\n )\n", (269, 371), False, 'from unittest.mock import patch\n'), (... |
from decimal import Decimal
from hummingbot.strategy.market_trading_pair_tuple import MarketTradingPairTuple
from hummingbot.strategy.perp2perp_arbitrage.perp2perp_arbitrage import Perp2PerpArbitrageStrategy
from hummingbot.strategy.perp2perp_arbitrage.perp2perp_arbitrage_config_map import perp2perp_arbitrage_config_ma... | [
"hummingbot.strategy.perp2perp_arbitrage.perp2perp_arbitrage_config_map.perp2perp_arbitrage_config_map.get",
"hummingbot.strategy.perp2perp_arbitrage.perp2perp_arbitrage.Perp2PerpArbitrageStrategy",
"hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple"
] | [((1736, 1822), 'hummingbot.strategy.market_trading_pair_tuple.MarketTradingPairTuple', 'MarketTradingPairTuple', (['self.markets[spot_connector]', 'spot_market', 'base_1', 'quote_1'], {}), '(self.markets[spot_connector], spot_market, base_1,\n quote_1)\n', (1758, 1822), False, 'from hummingbot.strategy.market_tradi... |
import asyncio
import logging
from typing import Optional, List
from hummingbot.core.data_type.user_stream_tracker_data_source import UserStreamTrackerDataSource
from hummingbot.logger import HummingbotLogger
from hummingbot.core.data_type.user_stream_tracker import UserStreamTracker
from hummingbot.core.utils.async_... | [
"hummingbot.core.utils.async_utils.safe_gather",
"hummingbot.connector.exchange.idex.idex_api_user_stream_data_source.IdexAPIUserStreamDataSource"
] | [((1198, 1222), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (1220, 1222), False, 'import asyncio\n'), ((749, 776), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (766, 776), False, 'import logging\n'), ((1535, 1650), 'hummingbot.connector.exchange.idex.idex_api_u... |
from decimal import Decimal
import unittest.mock
import hummingbot.strategy.perpetual_market_making.start as strategy_start
from hummingbot.connector.exchange_base import ExchangeBase
from hummingbot.strategy.perpetual_market_making.perpetual_market_making_config_map import (
perpetual_market_making_config_map as c... | [
"hummingbot.strategy.perpetual_market_making.perpetual_market_making_config_map.perpetual_market_making_config_map.get",
"hummingbot.strategy.perpetual_market_making.start.start",
"hummingbot.connector.exchange_base.ExchangeBase"
] | [((648, 676), 'test.hummingbot.strategy.assign_config_default', 'assign_config_default', (['c_map'], {}), '(c_map)\n', (669, 676), False, 'from test.hummingbot.strategy import assign_config_default\n'), ((813, 825), 'decimal.Decimal', 'Decimal', (['"""5"""'], {}), "('5')\n", (820, 825), False, 'from decimal import Deci... |
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
)
from hummingbot.client.settings import (
required_exchanges,
EXAMPLE_PAIRS,
)
from typing import Optional
def trading_pair_prompt():
... | [
"hummingbot.client.settings.required_exchanges.append",
"hummingbot.client.config.config_validators.validate_market_trading_pair",
"hummingbot.client.settings.EXAMPLE_PAIRS.get",
"hummingbot.client.config.config_var.ConfigVar"
] | [((390, 417), 'hummingbot.client.settings.EXAMPLE_PAIRS.get', 'EXAMPLE_PAIRS.get', (['exchange'], {}), '(exchange)\n', (407, 417), False, 'from hummingbot.client.settings import required_exchanges, EXAMPLE_PAIRS\n'), ((830, 875), 'hummingbot.client.config.config_validators.validate_market_trading_pair', 'validate_marke... |
import asyncio
import logging
import math
import time
from decimal import Decimal
from typing import Any, AsyncIterable, Dict, List, Optional
from hummingbot.connector.exchange.digifinex import digifinex_utils
from hummingbot.connector.exchange.digifinex.digifinex_global import DigifinexGlobal
from hummingbot.connecto... | [
"hummingbot.connector.exchange.digifinex.digifinex_in_flight_order.DigifinexInFlightOrder",
"hummingbot.core.data_type.cancellation_result.CancellationResult",
"hummingbot.connector.exchange.digifinex.digifinex_user_stream_tracker.DigifinexUserStreamTracker",
"hummingbot.connector.exchange.digifinex.digifinex... | [((1685, 1699), 'decimal.Decimal', 'Decimal', (['"""nan"""'], {}), "('nan')\n", (1692, 1699), False, 'from decimal import Decimal\n'), ((2905, 2961), 'hummingbot.connector.exchange.digifinex.digifinex_global.DigifinexGlobal', 'DigifinexGlobal', (['digifinex_api_key', 'digifinex_secret_key'], {}), '(digifinex_api_key, d... |
import re
from typing import Optional, Tuple
from hummingbot.connector.exchange.peatio.peatio_constants import Constants
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_methods import using_exchange
CENTRALIZED = True
EXAMPLE_PAIR = "BTC-ETH"
DEFAULT_FEES = [0.35, 0.4... | [
"hummingbot.client.config.config_methods.using_exchange"
] | [((1971, 2026), 're.compile', 're.compile', (['"""^(\\\\w+)(BTC|btc|ETH|eth|AUD|aud|PAX|pax)$"""'], {}), "('^(\\\\w+)(BTC|btc|ETH|eth|AUD|aud|PAX|pax)$')\n", (1981, 2026), False, 'import re\n'), ((503, 527), 'hummingbot.client.config.config_methods.using_exchange', 'using_exchange', (['"""peatio"""'], {}), "('peatio')\... |
import unittest
from prompt_toolkit.widgets import Button
from unittest.mock import patch, MagicMock
from hummingbot.client.tab.data_types import CommandTab
from hummingbot.client.ui.hummingbot_cli import HummingbotCLI
from hummingbot.client.ui.custom_widgets import CustomTextArea
class HummingbotCLITest(unittest.Te... | [
"hummingbot.client.ui.hummingbot_cli.HummingbotCLI"
] | [((1683, 1726), 'unittest.mock.patch', 'patch', (['"""hummingbot.client.ui.layout.Layout"""'], {}), "('hummingbot.client.ui.layout.Layout')\n", (1688, 1726), False, 'from unittest.mock import patch, MagicMock\n'), ((1732, 1783), 'unittest.mock.patch', 'patch', (['"""hummingbot.client.ui.layout.FloatContainer"""'], {}),... |
#!/usr/bin/env python
import asyncio
import logging
import hummingbot.connector.exchange.huobi.huobi_constants as CONSTANTS
from collections import defaultdict
from typing import (
Any,
Dict,
List,
Optional,
)
from hummingbot.connector.exchange.huobi.huobi_order_book import HuobiOrderBook
from hum... | [
"hummingbot.connector.exchange.huobi.huobi_order_book.HuobiOrderBook.diff_message_from_exchange",
"hummingbot.core.web_assistant.connections.data_types.RESTRequest",
"hummingbot.connector.exchange.huobi.huobi_utils.convert_to_exchange_trading_pair",
"hummingbot.connector.exchange.huobi.huobi_order_book.HuobiO... | [((2082, 2108), 'collections.defaultdict', 'defaultdict', (['asyncio.Queue'], {}), '(asyncio.Queue)\n', (2093, 2108), False, 'from collections import defaultdict\n'), ((2658, 2677), 'hummingbot.connector.exchange.huobi.huobi_utils.build_api_factory', 'build_api_factory', ([], {}), '()\n', (2675, 2677), False, 'from hum... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.