Closed AVOlight closed 1 month ago
working alternative
client.indexer_client.account.get_subaccount_asset_positions(subaccount.address, 0)
@AVOlight
client.get_current_block()
I am having the same problem, was this resolved?
@AVOlight
client.get_current_block()
I am having the same problem, was this resolved?
still have the same issue but I only need block height so using this alternative
import requests
constant_headers = {
'Accept': 'application/json'
}
constant_indexer_base_URL = 'https://indexer.dydx.trade/v4'
block_height_response = requests.get(f'{constant_indexer_base_URL}/height', headers = constant_headers)
block_height = int(block_height_response.json()['height'])
Thank you! I'll refer to it.
Seems like same issue I get when trying to run simple test for mainnet:
ERROR IS:
status = StatusCode.UNAVAILABLE
details = "DNS resolution failed for [https://dydx-ops-rpc.kingnodes.com:443](https://dydx-ops-rpc.kingnodes.com/): C-ares status is not ARES_SUCCESS qtype=AAAA name=[https://dydx-ops-rpc.kingnodes.com:443](https://dydx-ops-rpc.kingnodes.com/) is_balancer=0: Domain name not found"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-07-25T15:33:19.910389391+00:00", grpc_status:14, grpc_message:"DNS resolution failed for [https://dydx-ops-rpc.kingnodes.com:443](https://dydx-ops-rpc.kingnodes.com/): C-ares status is not ARES_SUCCESS qtype=AAAA name=[https://dydx-ops-rpc.kingnodes.com:443](https://dydx-ops-rpc.kingnodes.com/) is_balancer=0: Domain name not found"}"
The code is simplification v4-client-py-v2/examples/short_term_order_composite_example.py changed to MAINNET
websocket_indexer = "wss://indexer.dydx.trade/v4/ws"
#node_url = 'https://dydx-ops-rpc.kingnodes.com'
node_url = 'https://dydx-ops-rpc.kingnodes.com:443'
MAINNET = make_mainnet(rest_indexer,websocket_indexer,node_url)
NET = MAINNET
async def test():
node = await NodeClient.connect(NET.node)
indexer = IndexerClient(NET.rest_indexer)
market = Market((await indexer.markets.get_perpetual_markets(MARKET_ID))["markets"][MARKET_ID])
wallet = await Wallet.from_mnemonic(node, a9m, a9)
place = await node.place_order(
wallet,
market.order(
order_id,
to_order_side["BUY"],
size=0.001,
price=order.get("price", 3003.3),
time_in_force=order_execution_to_time_in_force["DEFAULT"],
reduce_only=False,
good_til_block=good_til_block,
),
)
wallet.sequence += 1
time.sleep(5)
asyncio.run(test())```
I tested with every nodes that are listed on dydx here and get the same error, i.e all of these nodes below give the same error:
Polkachu | https://dydx-dao-rpc.polkachu.com:443 | 300 req/m
Bware Labs | https://dydx-mainnet-full-rpc.public.blastapi.io:443 | 20 req/s
KingNodes | https://dydx-ops-rpc.kingnodes.com:443 | 250 req/m
Lavender.Five | https://dydx-rpc.lavenderfive.com:443 |
AutoStake | https://dydx-mainnet-rpc.autostake.com:443 | 4 req/s
EcoStake | https://rpc-dydx.ecostake.com:443 |
PublicNode | https://dydx-rpc.publicnode.com:443 |
Enigma | https://dydx-rpc.enigma-validator.com:443
Issue related to #214
Issue related to #214 . tldr: related to geo blocks
post.py working with fix https://github.com/dydxprotocol/v4-clients/issues/99#issuecomment-1868433704
any fix for get.py? tried many formats for VALIDATOR_GRPC_MAINNET and supported nodes from list