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
Copy file name to clipboardExpand all lines: README.md
+35-3Lines changed: 35 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,38 @@ You can find specific documentation on a per-product basis below.
35
35
## SDK Documentation
36
36
You can learn more about the Transpose SDK and how it works below.
37
37
38
+
### Updating Chain ID
39
+
If you want to change the chain ID of your query, you can do so by setting the `chain_id` or `chain` properties of the `Transpose` object. For example, if you want to query the Ethereum mainnet, you can do so by running the following code:
40
+
41
+
```python
42
+
from transpose import Transpose
43
+
api = Transpose(api_key="YOUR_API_KEY", chain_id=1)
44
+
```
45
+
46
+
or
47
+
```python
48
+
from transpose import Transpose
49
+
api = Transpose(api_key="YOUR_API_KEY", chain_id="ethereum")
50
+
```
51
+
52
+
if you wish to change the chain ID of an existing `Transpose` object, you can do so by running the following code:
53
+
54
+
```python
55
+
api.set_chain("ethereum")
56
+
```
57
+
58
+
or
59
+
60
+
```python
61
+
api.set_chain(1)
62
+
```
63
+
64
+
#### Currently supported chains
65
+
| Chain ID | Chain Name |
66
+
| :------: | :--------: |
67
+
| 1 | Ethereum |
68
+
| 137 | Polygon |
69
+
38
70
### SDK Classes
39
71
The Transpose SDK uses custom classes to represent API responses:
0 commit comments