Skip to content

Commit d6f2b7e

Browse files
author
github-actions
committed
[TRANSFER][BUILD][PUBLISH]
1 parent e9501ca commit d6f2b7e

File tree

2 files changed

+10
-43
lines changed

2 files changed

+10
-43
lines changed

.github/workflows/build-single-exchange.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,19 @@ jobs:
3636
.github/scripts/pushback.sh
3737
3838
- name: Set up Python
39+
if: contains(github.event.head_commit.message, '[PUBLISH]')
3940
uses: actions/setup-python@v4
4041
with:
4142
python-version: '3.x'
4243

4344
- name: Install dependencies
45+
if: contains(github.event.head_commit.message, '[PUBLISH]')
4446
run: |
4547
python -m pip install --upgrade pip
4648
pip install build twine
4749
4850
- name: PyPi packager
51+
if: contains(github.event.head_commit.message, '[PUBLISH]')
4952
env:
5053
PYPI_API_SECRET_SP: ${{ secrets.PYPI_API_SECRET_SP }}
5154
run: |

README.md

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,13 @@
1-
# bingx-python
2-
Python SDK (sync and async) for Bingx with Rest and WS capabilities.
1+
# about
32

4-
You can check Bingx's docs here: [Docs](https://ccxt.com)
3+
this is dev.repo, not meant to be used by end users.
54

5+
# instructions
66

7-
You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/bingx)
7+
- At first, generate `Personal Access Token` under `CCXT` org, with the access to this current repository and also to all other repositories (there are around 20 repositories named like: `github.com/ccxt/{exchange}-python`) with the scopes `actions, commit statuses, contents, workflows` and set that value for action secret with the name `API_TOKEN_FOR_CCXT_SINGLE_EXCHANGES`.
88

9-
*This package derives from CCXT and allows you to call pretty much every endpoint by either using the unified CCXT API or calling the endpoints directly*
9+
- Then inside `.github/workflows/transfer-all.yml` set the desired array of exchanges in matrix. On `push` event, if commit message contains `[build]`, this repo files will be distributed to those dozen exchange repositories.
1010

11-
## Installation
12-
13-
```
14-
pip install bingx
15-
```
16-
17-
## Usage
18-
19-
### Async
20-
21-
```Python
22-
from bingx import BingxAsync
23-
24-
async def main():
25-
instance = BingxAsync({})
26-
order = await instance.create_order(__EXAMPLE_SYMBOL__, "limit", "buy", 1, 100000)
27-
```
28-
29-
### Sync
30-
31-
```Python
32-
from bingx import BingxSync
33-
34-
def main():
35-
instance = BingxSync({})
36-
order = instance.create_order(__EXAMPLE_SYMBOL__, "limit", "buy", 1, 100000)
37-
```
38-
39-
### Websockets
40-
41-
```Python
42-
from bingx import BingxWs
43-
44-
async def main():
45-
instance = BingxWs({})
46-
while True:
47-
orders = await instance.watch_orders(__EXAMPLE_SYMBOL__)
48-
```
11+
- Immediately, as those repositories get `push` event, they will start build with `.github/workflows/build-single-exchange.yml` flow and each repo (you should set `PYPI_API_SECRET_SP` secret with pypi api key, under each repository) will push a package to pypi.org. Versions are incremental by patch version at this moment.
4912

13+
- All other things are WIP and can be customized.

0 commit comments

Comments
 (0)