You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supports [Dextools API v1](https://api.dextools.io/docs) and [Dextools API v2](https://api.dextools.io/blobr/v2/docs)
12
+
Supports [Dextools API v1](https://api.dextools.io/docs) and [Dextools API v2](https://developer.dextools.io/docs/start)
13
+
14
+
1.[Installation](#installation)
15
+
2.[Obtaining API Key](#obtaining-api-key)
16
+
3.[Getting Started](#getting-started)
17
+
1.[Version 1](#version-1)
18
+
2.[Version 2](#version-2)
19
+
1.[Available plans - Setting your plan](#available-plans---setting-your-plan)
20
+
4.[Version 1 Queries](#version-1-queries)
21
+
1.[Get pairs of a token](#get-pairs-of-a-token)
22
+
2.[Get token details](#get-token-details)
23
+
3.[Get chain list](#get-chain-list)
24
+
4.[Get exchange list](#get-exchange-list)
25
+
5.[Version 2 Queries](#version-2-queries)
26
+
1.[Blockchain](#blockchain)
27
+
1.[Get blockchain info](#get-blockchain-info)
28
+
2.[Get blockchains sorted by default settings](#get-blockchains-sorted-by-default-settings)
29
+
3.[Get blockchains sorted by default settings and descending order](#get-blockchains-sorted-by-default-settings-and-descending-order)
30
+
2.[Exchange](#exchange)
31
+
1.[Get dex factory info](#get-dex-factory-info)
32
+
2.[Get dexes on a specific chain](#get-dexes-on-a-specific-chain)
33
+
3.[Get dexes on a specific chain sorted by name and descending order](#get-dexes-on-a-specific-chain-sorted-by-name-and-descending-order)
34
+
3.[Pool](#pool)
35
+
1.[Get pool info](#get-pool-info)
36
+
2.[Get pool liquidity](#get-pool-liquidity)
37
+
3.[Get pool score](#get-pool-score)
38
+
4.[Get pool price](#get-pool-price)
39
+
5.[Get pools](#get-pools)
40
+
6.[Get pools sorted by `creationBlock` and descending order and providing block numbers instead](#get-pools-sorted-by-creationblock-and-descending-order-and-providing-block-numbers-instead)
41
+
4.[Token](#token)
42
+
1.[Get token](#get-token)
43
+
2.[Get token locks](#get-token-locks)
44
+
3.[Get token score](#get-token-score)
45
+
4.[Get token info](#get-token-info)
46
+
5.[Get token price](#get-token-price)
47
+
6.[Get tokens](#get-tokens)
48
+
7.[Get tokens sorted by `creationBlock` and descending order and providing block numbers instead in descending order](#get-tokens-sorted-by-creationblock-and-descending-order-and-providing-block-numbers-instead-in-descending-order)
49
+
8.[Get tokens sorted by `socialsInfoUpdated` and descending order and datetimes in descending order](#get-tokens-sorted-by-socialsinfoupdated-and-descending-order-and-datetimes-in-descending-order)
50
+
9.[Get token pools](#get-token-pools)
51
+
10.[Get token pools sorted by `creationBlock` and descending order and providing block numbers instead in descending order](#get-token-pools-sorted-by-creationblock-and-descending-order-and-providing-block-numbers-instead-in-descending-order)
52
+
5.[Rankings](#rankings)
53
+
1.[Get hot pools](#get-hot-pools)
54
+
2.[Get gainers](#get-gainers)
55
+
3.[Get losers](#get-losers)
56
+
6.[Page and PageSize arguments](#page-and-pagesize-arguments)
57
+
7.[Asynchronous support with asyncio](#asynchronous-support-with-asyncio)
@@ -18,7 +73,7 @@ To obtain an API key, head to the [Developer Portal](https://developer.dextools.
18
73
19
74
20
75
## Getting Started
21
-
There are 2 versions of the Dextools API. [Dextools API v1](https://api.dextools.io/docs) and [Dextools API v2](https://api.dextools.io/blobr/v2/docs)
76
+
There are 2 versions of the Dextools API. [Dextools API v1](https://api.dextools.io/docs) and [Dextools API v2](https://developer.dextools.io/docs/start)
22
77
23
78
### Version 1
24
79
To get started, import the package, and initiate a `DextoolsAPI` instance object by passing your API key:
@@ -107,7 +162,7 @@ print(exchange_list)
107
162
```
108
163
109
164
## Version 2 Queries
110
-
Below are a set of queries supported by the [Dextools API v2](https://api.dextools.io/blobr/v2/docs). All data is returned as a Python dictionary for easy data handling.
165
+
Below are a set of queries supported by the [Dextools API v2](https://developer.dextools.io/docs/start). All data is returned as a Python dictionary for easy data handling.
Some methods support the `page` and `pageSize` arguments. Check out the [Dextools API v2](https://api.dextools.io/v2/docs) documentation for more information.
322
+
## Page and PageSize arguments
323
+
Some methods support the `page` and `pageSize` arguments. Check out the API documentation for more information.
324
+
325
+
## Asynchronous support with asyncio
326
+
Asynchronous support has been added through [asyncio](https://docs.python.org/3/library/asyncio.html).
327
+
328
+
Through a context manager (session will close automatically when the context manager ends):
329
+
```
330
+
import asyncio
331
+
from dextools_python import AsyncDextoolsAPIV2
332
+
333
+
api_key = "YOUR_API_KEY"
334
+
335
+
async def main():
336
+
async with AsyncDextoolsAPIV2(api_key, plan="partner") as dextools:
337
+
response = await dextools.get_blockchains()
338
+
print(response)
339
+
340
+
asyncio.run(main())
341
+
```
342
+
343
+
Creating an instance and then closing the session explicitly at the end:
0 commit comments