Merge branch 'develop' into feat/short
This commit is contained in:
commit
dafc2bf361
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -31,14 +31,14 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Cache_dependencies
|
- name: Cache_dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: ~/dependencies/
|
path: ~/dependencies/
|
||||||
key: ${{ runner.os }}-dependencies
|
key: ${{ runner.os }}-dependencies
|
||||||
|
|
||||||
- name: pip cache (linux)
|
- name: pip cache (linux)
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
@ -126,14 +126,14 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Cache_dependencies
|
- name: Cache_dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: ~/dependencies/
|
path: ~/dependencies/
|
||||||
key: ${{ runner.os }}-dependencies
|
key: ${{ runner.os }}-dependencies
|
||||||
|
|
||||||
- name: pip cache (macOS)
|
- name: pip cache (macOS)
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
with:
|
with:
|
||||||
path: ~/Library/Caches/pip
|
path: ~/Library/Caches/pip
|
||||||
@ -218,7 +218,7 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Pip cache (Windows)
|
- name: Pip cache (Windows)
|
||||||
uses: actions/cache@preview
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~\AppData\Local\pip\Cache
|
path: ~\AppData\Local\pip\Cache
|
||||||
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip
|
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip
|
||||||
|
2
.github/workflows/docker_update_readme.yml
vendored
2
.github/workflows/docker_update_readme.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Docker Hub Description
|
- name: Docker Hub Description
|
||||||
uses: peter-evans/dockerhub-description@v2.4.3
|
uses: peter-evans/dockerhub-description@v3
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
mkdocs==1.2.3
|
mkdocs==1.3.0
|
||||||
mkdocs-material==8.2.5
|
mkdocs-material==8.2.8
|
||||||
mdx_truly_sane_lists==1.2
|
mdx_truly_sane_lists==1.2
|
||||||
pymdown-extensions==9.3
|
pymdown-extensions==9.3
|
||||||
jinja2==3.0.3
|
jinja2==3.1.1
|
||||||
|
@ -25,6 +25,7 @@ class Kucoin(Exchange):
|
|||||||
"l2_limit_range_required": False,
|
"l2_limit_range_required": False,
|
||||||
"order_time_in_force": ['gtc', 'fok', 'ioc'],
|
"order_time_in_force": ['gtc', 'fok', 'ioc'],
|
||||||
"time_in_force_parameter": "timeInForce",
|
"time_in_force_parameter": "timeInForce",
|
||||||
|
"ohlcv_candle_limit": 1500,
|
||||||
}
|
}
|
||||||
|
|
||||||
def stoploss_adjust(self, stop_loss: float, order: Dict, side: str) -> bool:
|
def stoploss_adjust(self, stop_loss: float, order: Dict, side: str) -> bool:
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
coveralls==3.3.1
|
coveralls==3.3.1
|
||||||
flake8==4.0.1
|
flake8==4.0.1
|
||||||
flake8-tidy-imports==4.6.0
|
flake8-tidy-imports==4.6.0
|
||||||
mypy==0.941
|
mypy==0.942
|
||||||
pytest==7.1.1
|
pytest==7.1.1
|
||||||
pytest-asyncio==0.18.2
|
pytest-asyncio==0.18.3
|
||||||
pytest-cov==3.0.0
|
pytest-cov==3.0.0
|
||||||
pytest-mock==3.7.0
|
pytest-mock==3.7.0
|
||||||
pytest-random-order==1.0.4
|
pytest-random-order==1.0.4
|
||||||
@ -22,7 +22,7 @@ nbconvert==6.4.4
|
|||||||
# mypy types
|
# mypy types
|
||||||
types-cachetools==5.0.0
|
types-cachetools==5.0.0
|
||||||
types-filelock==3.2.5
|
types-filelock==3.2.5
|
||||||
types-requests==2.27.14
|
types-requests==2.27.15
|
||||||
types-tabulate==0.8.6
|
types-tabulate==0.8.6
|
||||||
|
|
||||||
# Extensions to datetime library
|
# Extensions to datetime library
|
||||||
|
@ -2,7 +2,7 @@ numpy==1.22.3
|
|||||||
pandas==1.4.1
|
pandas==1.4.1
|
||||||
pandas-ta==0.3.14b
|
pandas-ta==0.3.14b
|
||||||
|
|
||||||
ccxt==1.77.29
|
ccxt==1.77.45
|
||||||
# Pin cryptography for now due to rust build errors with piwheels
|
# Pin cryptography for now due to rust build errors with piwheels
|
||||||
cryptography==36.0.2
|
cryptography==36.0.2
|
||||||
aiohttp==3.8.1
|
aiohttp==3.8.1
|
||||||
@ -17,7 +17,7 @@ TA-Lib==0.4.24
|
|||||||
technical==1.3.0
|
technical==1.3.0
|
||||||
tabulate==0.8.9
|
tabulate==0.8.9
|
||||||
pycoingecko==2.2.0
|
pycoingecko==2.2.0
|
||||||
jinja2==3.0.3
|
jinja2==3.1.1
|
||||||
tables==3.7.0
|
tables==3.7.0
|
||||||
blosc==1.10.6
|
blosc==1.10.6
|
||||||
|
|
||||||
|
@ -1612,8 +1612,8 @@ def limit_buy_order_open():
|
|||||||
'type': 'limit',
|
'type': 'limit',
|
||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'timestamp': arrow.utcnow().int_timestamp,
|
|
||||||
'price': 0.00001099,
|
'price': 0.00001099,
|
||||||
'amount': 90.99181073,
|
'amount': 90.99181073,
|
||||||
'filled': 0.0,
|
'filled': 0.0,
|
||||||
@ -1639,6 +1639,7 @@ def market_buy_order():
|
|||||||
'type': 'market',
|
'type': 'market',
|
||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'price': 0.00004099,
|
'price': 0.00004099,
|
||||||
'amount': 91.99181073,
|
'amount': 91.99181073,
|
||||||
@ -1655,6 +1656,7 @@ def market_sell_order():
|
|||||||
'type': 'market',
|
'type': 'market',
|
||||||
'side': 'sell',
|
'side': 'sell',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'price': 0.00004173,
|
'price': 0.00004173,
|
||||||
'amount': 91.99181073,
|
'amount': 91.99181073,
|
||||||
@ -1671,7 +1673,8 @@ def limit_buy_order_old():
|
|||||||
'type': 'limit',
|
'type': 'limit',
|
||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
'datetime': str(arrow.utcnow().shift(minutes=-601).datetime),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'price': 0.00001099,
|
'price': 0.00001099,
|
||||||
'amount': 90.99181073,
|
'amount': 90.99181073,
|
||||||
'filled': 0.0,
|
'filled': 0.0,
|
||||||
@ -1687,6 +1690,7 @@ def limit_sell_order_old():
|
|||||||
'type': 'limit',
|
'type': 'limit',
|
||||||
'side': 'sell',
|
'side': 'sell',
|
||||||
'symbol': 'ETH/BTC',
|
'symbol': 'ETH/BTC',
|
||||||
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'price': 0.00001099,
|
'price': 0.00001099,
|
||||||
'amount': 90.99181073,
|
'amount': 90.99181073,
|
||||||
@ -1703,6 +1707,7 @@ def limit_buy_order_old_partial():
|
|||||||
'type': 'limit',
|
'type': 'limit',
|
||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'ETH/BTC',
|
'symbol': 'ETH/BTC',
|
||||||
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'price': 0.00001099,
|
'price': 0.00001099,
|
||||||
'amount': 90.99181073,
|
'amount': 90.99181073,
|
||||||
@ -1732,7 +1737,7 @@ def limit_buy_order_canceled_empty(request):
|
|||||||
'info': {},
|
'info': {},
|
||||||
'id': '1234512345',
|
'id': '1234512345',
|
||||||
'clientOrderId': None,
|
'clientOrderId': None,
|
||||||
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'lastTradeTimestamp': None,
|
'lastTradeTimestamp': None,
|
||||||
'symbol': 'LTC/USDT',
|
'symbol': 'LTC/USDT',
|
||||||
@ -1753,7 +1758,7 @@ def limit_buy_order_canceled_empty(request):
|
|||||||
'info': {},
|
'info': {},
|
||||||
'id': 'AZNPFF-4AC4N-7MKTAT',
|
'id': 'AZNPFF-4AC4N-7MKTAT',
|
||||||
'clientOrderId': None,
|
'clientOrderId': None,
|
||||||
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'lastTradeTimestamp': None,
|
'lastTradeTimestamp': None,
|
||||||
'status': 'canceled',
|
'status': 'canceled',
|
||||||
@ -1774,7 +1779,7 @@ def limit_buy_order_canceled_empty(request):
|
|||||||
'info': {},
|
'info': {},
|
||||||
'id': '1234512345',
|
'id': '1234512345',
|
||||||
'clientOrderId': 'alb1234123',
|
'clientOrderId': 'alb1234123',
|
||||||
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'lastTradeTimestamp': None,
|
'lastTradeTimestamp': None,
|
||||||
'symbol': 'LTC/USDT',
|
'symbol': 'LTC/USDT',
|
||||||
@ -1795,7 +1800,7 @@ def limit_buy_order_canceled_empty(request):
|
|||||||
'info': {},
|
'info': {},
|
||||||
'id': '1234512345',
|
'id': '1234512345',
|
||||||
'clientOrderId': 'alb1234123',
|
'clientOrderId': 'alb1234123',
|
||||||
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp,
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'lastTradeTimestamp': None,
|
'lastTradeTimestamp': None,
|
||||||
'symbol': 'LTC/USDT',
|
'symbol': 'LTC/USDT',
|
||||||
@ -1821,7 +1826,7 @@ def limit_sell_order_open():
|
|||||||
'side': 'sell',
|
'side': 'sell',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'timestamp': arrow.utcnow().int_timestamp,
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'price': 0.00001173,
|
'price': 0.00001173,
|
||||||
'amount': 90.99181073,
|
'amount': 90.99181073,
|
||||||
'filled': 0.0,
|
'filled': 0.0,
|
||||||
@ -1987,7 +1992,7 @@ def tickers():
|
|||||||
'BLK/BTC': {
|
'BLK/BTC': {
|
||||||
'symbol': 'BLK/BTC',
|
'symbol': 'BLK/BTC',
|
||||||
'timestamp': 1522014806072,
|
'timestamp': 1522014806072,
|
||||||
'datetime': '2018-03-25T21:53:26.720Z',
|
'datetime': '2018-03-25T21:53:26.072Z',
|
||||||
'high': 0.007745,
|
'high': 0.007745,
|
||||||
'low': 0.007512,
|
'low': 0.007512,
|
||||||
'bid': 0.007729,
|
'bid': 0.007729,
|
||||||
@ -2483,7 +2488,8 @@ def buy_order_fee():
|
|||||||
'type': 'limit',
|
'type': 'limit',
|
||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
'datetime': str(arrow.utcnow().shift(minutes=-601).datetime),
|
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
|
||||||
|
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
|
||||||
'price': 0.245441,
|
'price': 0.245441,
|
||||||
'amount': 8.0,
|
'amount': 8.0,
|
||||||
'cost': 1.963528,
|
'cost': 1.963528,
|
||||||
@ -2801,7 +2807,7 @@ def limit_buy_order_usdt_open():
|
|||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'timestamp': arrow.utcnow().int_timestamp,
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'price': 2.00,
|
'price': 2.00,
|
||||||
'amount': 30.0,
|
'amount': 30.0,
|
||||||
'filled': 0.0,
|
'filled': 0.0,
|
||||||
@ -2828,7 +2834,7 @@ def limit_sell_order_usdt_open():
|
|||||||
'side': 'sell',
|
'side': 'sell',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'timestamp': arrow.utcnow().int_timestamp,
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'price': 2.20,
|
'price': 2.20,
|
||||||
'amount': 30.0,
|
'amount': 30.0,
|
||||||
'cost': 66.0,
|
'cost': 66.0,
|
||||||
@ -2854,6 +2860,7 @@ def market_buy_order_usdt():
|
|||||||
'type': 'market',
|
'type': 'market',
|
||||||
'side': 'buy',
|
'side': 'buy',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'price': 2.00,
|
'price': 2.00,
|
||||||
'amount': 30.0,
|
'amount': 30.0,
|
||||||
@ -2910,6 +2917,7 @@ def market_sell_order_usdt():
|
|||||||
'type': 'market',
|
'type': 'market',
|
||||||
'side': 'sell',
|
'side': 'sell',
|
||||||
'symbol': 'mocked',
|
'symbol': 'mocked',
|
||||||
|
'timestamp': arrow.utcnow().int_timestamp * 1000,
|
||||||
'datetime': arrow.utcnow().isoformat(),
|
'datetime': arrow.utcnow().isoformat(),
|
||||||
'price': 2.20,
|
'price': 2.20,
|
||||||
'amount': 30.0,
|
'amount': 30.0,
|
||||||
|
@ -1247,7 +1247,7 @@ def test_create_order(default_conf, mocker, side, ordertype, rate, marketprice,
|
|||||||
ordertype=ordertype,
|
ordertype=ordertype,
|
||||||
side=side,
|
side=side,
|
||||||
amount=1,
|
amount=1,
|
||||||
rate=200,
|
rate=rate,
|
||||||
leverage=1.0
|
leverage=1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user