Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/basic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def main():
# Set up the environment (exchange, account info, etc.) for testing purposes.
address, info, exchange = example_utils.setup(constants.TESTNET_API_URL, skip_ws=True)

# Ensure that the wallet address and agent address are not the same
# Ensure that the wallet address and agent address are the same
# This prevents the risk of accidentally creating an agent using the wallet itself.
if exchange.account_address != exchange.wallet.address:
if address != exchange.wallet.address:
raise Exception("You should not create an agent using an agent")

approve_result, agent_key = exchange.approve_agent()
Expand Down Expand Up @@ -74,7 +74,7 @@ def main():

# Place an order with the extra agent using the same process as the original agent.
print("Placing order with original agent")
order_result = agent_exchange.order("ETH", True, 0.2, 1000, {"limit": {"tif": "Gtc"}})
order_result = extra_agent_exchange.order("ETH", True, 0.2, 1000, {"limit": {"tif": "Gtc"}})
print(order_result)

# If the extra agent's order is placed successfully, attempt to cancel it.
Expand Down