import asyncio
from eth_utils.address import to_checksum_address
from gte_py.clients import GTEClient
from gte_py.configs import TESTNET_CONFIG
from gte_py.models import OrderSide
async def main():
# Load the default testnet configuration for MegaETH
config = TESTNET_CONFIG
# Initialize the GTEClient with your wallet's private key
async with GTEClient(config=config, wallet_private_key=PRIVATE_KEY) as client:
# Fetch market information
market = await client.info.get_market(MARKET_ADDRESS)
# Place a market order
order = await client.execution.place_market_order(
market, OrderSide.BUY, size=0.01,
amount_is_raw=False, slippage=0.05, gas=50 * 10 ** 6
)
print(f"Market order placed: {order}")
if __name__ == "__main__":
asyncio.run(main())