@@ -59,13 +59,13 @@ How to use the package:
59
59
from alpha_homora_v2 import AvalanchePosition
60
60
` ` `
61
61
62
- 2. ** (Optional)** Instantiate your custom Web3 provider object to interact with the network:
62
+ < ! -- 2. ** (Optional)** Instantiate your custom Web3 provider object to interact with the network:
63
63
` ` ` python
64
64
from alpha_homora_v2.util import get_web3_provider
65
65
66
66
NETWORK_RPC_URL = " your_rpc_url"
67
67
provider = get_web3_provider(NETWORK_RPC_URL)
68
- ` ` `
68
+ ` ` ` -- >
69
69
3. Creating an [AvalanchePosition](alpha_homora_v2/position.py) instance requires the following:
70
70
- Your position ID (an integer)
71
71
- This ID should match your position on Alpha Homora, without the " #"
@@ -85,24 +85,24 @@ How to use the package:
85
85
- your public wallet key
86
86
- ** (Optional)** your private wallet key
87
87
- Your private key is required to sign transactional methods
88
- - ** (Optional)** A web3 provider object
89
- - If none is passed, an HTTP provider will be created with the [default Avalanche RPC URL](https://api.avax.network/ext/bc/C/rpc)
88
+ < ! -- - ** (Optional)** A web3 provider object
89
+ - If none is passed, an HTTP provider will be created with the [default Avalanche RPC URL](https://api.avax.network/ext/bc/C/rpc) -- >
90
90
91
91
Once you' ve gathered all of these variables, you can create the position instance like this example below:
92
92
```python
93
93
position = AvalanchePosition(
94
94
position_id=11049,
95
95
owner_wallet_address="0x...",
96
- owner_private_key="123abc456efg789hij...", # <- Optional - see step 4
97
- web3_provider=provider) # <- Optional If you' d like to use a custom provider
96
+ owner_private_key="123abc456efg789hij...") # <- Optional - see step 4
98
97
```
98
+ <!-- web3_provider=provider) # <- Optional If you' d like to use a custom provider -->
99
99
4. Alternatively, get all open positions ([AvalanchePosition](alpha_homora_v2/position.py) objects) by owner wallet address:
100
100
` ` ` python
101
101
from alpha_homora_v2.position import get_avax_positions_by_owner
102
102
103
103
positions = get_avax_positions_by_owner(owner_address=" owner_wallet_address" ,
104
104
owner_private_key=" owner_private_key" , # <- Optional
105
- web3_provider=provider) # <- Optional
105
+ )
106
106
107
107
# NOTE: Passing the private key is optional, but required if you want to use transactional methods on the returned AvalanchePosition object(s).
108
108
` ` `
@@ -148,7 +148,7 @@ How to use the package:
148
148
position.get_pool_tokens ()
149
149
150
150
# Get the debt of each token in the position (token, debt_uint256, debt_token, debt_usd):
151
- position.get_tokens_debts ()
151
+ position.get_token_debts ()
152
152
# Alternatively, get the debt of a single token:
153
153
position.get_token_debts(token_address)
154
154
0 commit comments