lnmarkets-sdk 0.0.2__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lnmarkets-sdk might be problematic. Click here for more details.
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/PKG-INFO +67 -35
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/README.md +66 -34
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/pyproject.toml +1 -1
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/uv.lock +1 -1
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/.github/workflows/check.yml +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/.gitignore +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/.markdownlint.json +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/LICENSE +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/Makefile +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/codebook.toml +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/examples/basic.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/images/lnmarkets-logo.svg +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/scripts/create-api-key-v3.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/__init__.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/_internal/__init__.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/_internal/models.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/_internal/utils.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/__init__.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/account.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/futures/__init__.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/futures/cross.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/futures/isolated.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/oracle.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/client/synthetic_usd.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/__init__.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/account.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/funding_fees.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/futures_cross.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/futures_data.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/futures_isolated.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/oracle.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/models/synthetic_usd.py +0 -0
- {lnmarkets_sdk-0.0.2 → lnmarkets_sdk-0.0.3}/src/lnmarkets_sdk/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lnmarkets-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: LN Markets API Python SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/ln-markets/sdk-python
|
|
6
6
|
Project-URL: Repository, https://github.com/ln-markets/sdk-python
|
|
@@ -61,31 +61,6 @@ async with LNMClient(config) as client:
|
|
|
61
61
|
account = await client.account.get_account()
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
or let playwright create it for you by typing the following command in your terminal at the project root
|
|
65
|
-
(assuming you have `make` installed on your machine):
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
make create-api-key
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
This will create a new API key for you and write it to the `.env` file at the project root.
|
|
72
|
-
|
|
73
|
-
```txt
|
|
74
|
-
# LN Markets API V3 Credentials
|
|
75
|
-
LNM_API_KEY_V3=<your_api_key>
|
|
76
|
-
LNM_API_SECRET_V3=<your_api_secret>
|
|
77
|
-
LNM_API_PASSPHRASE_V3=<your_api_passphrase>
|
|
78
|
-
LNM_API_NAME_V3=<your_api_keyname>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
After that, you can use the client to make API requests to the LN Markets API:
|
|
82
|
-
|
|
83
|
-
```python
|
|
84
|
-
async with LNMClient(config) as client:
|
|
85
|
-
account = await client.account.get_account()
|
|
86
|
-
btc_address = await client.account.get_bitcoin_address()
|
|
87
|
-
```
|
|
88
|
-
|
|
89
64
|
For endpoints that requires input parameters, you can find the corresponding models in the `lnmarkets_sdk.models` module.
|
|
90
65
|
|
|
91
66
|
```python
|
|
@@ -111,19 +86,76 @@ async with LNMClient(config) as client:
|
|
|
111
86
|
|
|
112
87
|
Check our [example](./examples/basic.py) for more details.
|
|
113
88
|
|
|
114
|
-
##
|
|
115
|
-
|
|
116
|
-
For full API documentation, see: [LNM API Documentation](https://docs.lnmarkets.com/)
|
|
117
|
-
|
|
118
|
-
## Examples
|
|
89
|
+
## Available Methods
|
|
119
90
|
|
|
120
|
-
|
|
91
|
+
🔒 = requires API credentials
|
|
121
92
|
|
|
122
|
-
```
|
|
123
|
-
|
|
93
|
+
```python
|
|
94
|
+
# Ping
|
|
95
|
+
client.ping()
|
|
96
|
+
|
|
97
|
+
# Account 🔒
|
|
98
|
+
client.account.get_account()
|
|
99
|
+
client.account.get_bitcoin_address()
|
|
100
|
+
client.account.add_bitcoin_address()
|
|
101
|
+
client.account.deposit_lightning()
|
|
102
|
+
client.account.withdraw_lightning()
|
|
103
|
+
client.account.withdraw_internal()
|
|
104
|
+
client.account.withdraw_on_chain()
|
|
105
|
+
client.account.get_lightning_deposits()
|
|
106
|
+
client.account.get_lightning_withdrawals()
|
|
107
|
+
client.account.get_internal_deposits()
|
|
108
|
+
client.account.get_internal_withdrawals()
|
|
109
|
+
client.account.get_on_chain_deposits()
|
|
110
|
+
client.account.get_on_chain_withdrawals()
|
|
111
|
+
|
|
112
|
+
# Futures
|
|
113
|
+
client.futures.get_ticker()
|
|
114
|
+
client.futures.get_leaderboard()
|
|
115
|
+
client.futures.get_candles()
|
|
116
|
+
client.futures.get_funding_settlements()
|
|
117
|
+
|
|
118
|
+
# Futures Isolated 🔒
|
|
119
|
+
client.futures.isolated.new_trade()
|
|
120
|
+
client.futures.isolated.get_running_trades()
|
|
121
|
+
client.futures.isolated.get_open_trades()
|
|
122
|
+
client.futures.isolated.get_closed_trades()
|
|
123
|
+
client.futures.isolated.close()
|
|
124
|
+
client.futures.isolated.cancel()
|
|
125
|
+
client.futures.isolated.cancel_all()
|
|
126
|
+
client.futures.isolated.add_margin()
|
|
127
|
+
client.futures.isolated.cash_in()
|
|
128
|
+
client.futures.isolated.update_stoploss()
|
|
129
|
+
client.futures.isolated.update_takeprofit()
|
|
130
|
+
client.futures.isolated.get_funding_fees()
|
|
131
|
+
|
|
132
|
+
# Futures Cross 🔒
|
|
133
|
+
client.futures.cross.new_order()
|
|
134
|
+
client.futures.cross.get_position()
|
|
135
|
+
client.futures.cross.get_open_orders()
|
|
136
|
+
client.futures.cross.get_filled_orders()
|
|
137
|
+
client.futures.cross.close()
|
|
138
|
+
client.futures.cross.cancel()
|
|
139
|
+
client.futures.cross.cancel_all()
|
|
140
|
+
client.futures.cross.deposit()
|
|
141
|
+
client.futures.cross.withdraw()
|
|
142
|
+
client.futures.cross.set_leverage()
|
|
143
|
+
client.futures.cross.get_transfers()
|
|
144
|
+
client.futures.cross.get_funding_fees()
|
|
145
|
+
|
|
146
|
+
# Oracle
|
|
147
|
+
client.oracle.get_index()
|
|
148
|
+
client.oracle.get_last_price()
|
|
149
|
+
|
|
150
|
+
# Synthetic USD
|
|
151
|
+
client.synthetic_usd.get_best_price()
|
|
152
|
+
client.synthetic_usd.get_swaps() # 🔒
|
|
153
|
+
client.synthetic_usd.new_swap() # 🔒
|
|
124
154
|
```
|
|
125
155
|
|
|
126
|
-
|
|
156
|
+
## API Reference
|
|
157
|
+
|
|
158
|
+
For full API documentation, see: [LNM API Documentation](https://docs.lnmarkets.com/)
|
|
127
159
|
|
|
128
160
|
## Contributing
|
|
129
161
|
|
|
@@ -37,31 +37,6 @@ async with LNMClient(config) as client:
|
|
|
37
37
|
account = await client.account.get_account()
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
or let playwright create it for you by typing the following command in your terminal at the project root
|
|
41
|
-
(assuming you have `make` installed on your machine):
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
make create-api-key
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
This will create a new API key for you and write it to the `.env` file at the project root.
|
|
48
|
-
|
|
49
|
-
```txt
|
|
50
|
-
# LN Markets API V3 Credentials
|
|
51
|
-
LNM_API_KEY_V3=<your_api_key>
|
|
52
|
-
LNM_API_SECRET_V3=<your_api_secret>
|
|
53
|
-
LNM_API_PASSPHRASE_V3=<your_api_passphrase>
|
|
54
|
-
LNM_API_NAME_V3=<your_api_keyname>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
After that, you can use the client to make API requests to the LN Markets API:
|
|
58
|
-
|
|
59
|
-
```python
|
|
60
|
-
async with LNMClient(config) as client:
|
|
61
|
-
account = await client.account.get_account()
|
|
62
|
-
btc_address = await client.account.get_bitcoin_address()
|
|
63
|
-
```
|
|
64
|
-
|
|
65
40
|
For endpoints that requires input parameters, you can find the corresponding models in the `lnmarkets_sdk.models` module.
|
|
66
41
|
|
|
67
42
|
```python
|
|
@@ -87,19 +62,76 @@ async with LNMClient(config) as client:
|
|
|
87
62
|
|
|
88
63
|
Check our [example](./examples/basic.py) for more details.
|
|
89
64
|
|
|
90
|
-
##
|
|
91
|
-
|
|
92
|
-
For full API documentation, see: [LNM API Documentation](https://docs.lnmarkets.com/)
|
|
93
|
-
|
|
94
|
-
## Examples
|
|
65
|
+
## Available Methods
|
|
95
66
|
|
|
96
|
-
|
|
67
|
+
🔒 = requires API credentials
|
|
97
68
|
|
|
98
|
-
```
|
|
99
|
-
|
|
69
|
+
```python
|
|
70
|
+
# Ping
|
|
71
|
+
client.ping()
|
|
72
|
+
|
|
73
|
+
# Account 🔒
|
|
74
|
+
client.account.get_account()
|
|
75
|
+
client.account.get_bitcoin_address()
|
|
76
|
+
client.account.add_bitcoin_address()
|
|
77
|
+
client.account.deposit_lightning()
|
|
78
|
+
client.account.withdraw_lightning()
|
|
79
|
+
client.account.withdraw_internal()
|
|
80
|
+
client.account.withdraw_on_chain()
|
|
81
|
+
client.account.get_lightning_deposits()
|
|
82
|
+
client.account.get_lightning_withdrawals()
|
|
83
|
+
client.account.get_internal_deposits()
|
|
84
|
+
client.account.get_internal_withdrawals()
|
|
85
|
+
client.account.get_on_chain_deposits()
|
|
86
|
+
client.account.get_on_chain_withdrawals()
|
|
87
|
+
|
|
88
|
+
# Futures
|
|
89
|
+
client.futures.get_ticker()
|
|
90
|
+
client.futures.get_leaderboard()
|
|
91
|
+
client.futures.get_candles()
|
|
92
|
+
client.futures.get_funding_settlements()
|
|
93
|
+
|
|
94
|
+
# Futures Isolated 🔒
|
|
95
|
+
client.futures.isolated.new_trade()
|
|
96
|
+
client.futures.isolated.get_running_trades()
|
|
97
|
+
client.futures.isolated.get_open_trades()
|
|
98
|
+
client.futures.isolated.get_closed_trades()
|
|
99
|
+
client.futures.isolated.close()
|
|
100
|
+
client.futures.isolated.cancel()
|
|
101
|
+
client.futures.isolated.cancel_all()
|
|
102
|
+
client.futures.isolated.add_margin()
|
|
103
|
+
client.futures.isolated.cash_in()
|
|
104
|
+
client.futures.isolated.update_stoploss()
|
|
105
|
+
client.futures.isolated.update_takeprofit()
|
|
106
|
+
client.futures.isolated.get_funding_fees()
|
|
107
|
+
|
|
108
|
+
# Futures Cross 🔒
|
|
109
|
+
client.futures.cross.new_order()
|
|
110
|
+
client.futures.cross.get_position()
|
|
111
|
+
client.futures.cross.get_open_orders()
|
|
112
|
+
client.futures.cross.get_filled_orders()
|
|
113
|
+
client.futures.cross.close()
|
|
114
|
+
client.futures.cross.cancel()
|
|
115
|
+
client.futures.cross.cancel_all()
|
|
116
|
+
client.futures.cross.deposit()
|
|
117
|
+
client.futures.cross.withdraw()
|
|
118
|
+
client.futures.cross.set_leverage()
|
|
119
|
+
client.futures.cross.get_transfers()
|
|
120
|
+
client.futures.cross.get_funding_fees()
|
|
121
|
+
|
|
122
|
+
# Oracle
|
|
123
|
+
client.oracle.get_index()
|
|
124
|
+
client.oracle.get_last_price()
|
|
125
|
+
|
|
126
|
+
# Synthetic USD
|
|
127
|
+
client.synthetic_usd.get_best_price()
|
|
128
|
+
client.synthetic_usd.get_swaps() # 🔒
|
|
129
|
+
client.synthetic_usd.new_swap() # 🔒
|
|
100
130
|
```
|
|
101
131
|
|
|
102
|
-
|
|
132
|
+
## API Reference
|
|
133
|
+
|
|
134
|
+
For full API documentation, see: [LNM API Documentation](https://docs.lnmarkets.com/)
|
|
103
135
|
|
|
104
136
|
## Contributing
|
|
105
137
|
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
urls = { "Homepage" = "https://github.com/ln-markets/sdk-python", "Repository" = "https://github.com/ln-markets/sdk-python", "Bug Tracker" = "https://github.com/ln-markets/sdk-python/issues" }
|
|
7
7
|
|
|
8
8
|
name = "lnmarkets-sdk"
|
|
9
|
-
version = "0.0.
|
|
9
|
+
version = "0.0.3"
|
|
10
10
|
description = "LN Markets API Python SDK"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
license = { text = "MIT" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|