Skip to content

Commit

Permalink
introducing... pinegreene
Browse files Browse the repository at this point in the history
  • Loading branch information
pinegreene committed Aug 12, 2024
1 parent 7c8ef32 commit 847b72e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 2 additions & 6 deletions EXAMPLE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(.venv) alex@polymarket-testing:~/agents$ python -i application/trade.py
(.venv) $ python -i application/trade.py

1. FOUND 27 EVENTS

... prompting ... You are an AI assistant for analyzing prediction markets.
Expand Down Expand Up @@ -121,9 +122,4 @@ result: ```
size:0.2,
side: BUY,
```
Execute market order... signed_order SignedOrder(order=<py_order_utils.model.order.Order object at 0x7f8355946190>, signature='0xffe143a67712c15a5ac1d1db55ef88b7d8e3707f3ed2c88e5cd78bb002f3e844078e5beccd50f4c3c2452c5ba32434f86e09e1ae6c496e23e47673472a2f81031c')
{'errorMsg': '', 'orderID': '0x9894763ce9176bd3feb62003a44086dbac09a797592f05c96117eba85005c2d1', 'takingAmount': '7.614582', 'makingAmount': '7.309998', 'status': 'matched', 'transactionsHashes': ['0xa095272f6be923381d3d8d72dc7f68bff928d4fed0e99faa486ff3d2228c2173'], 'success': True}
Done!
6. TRADED {'errorMsg': '', 'orderID': '0x9894763ce9176bd3feb62003a44086dbac09a797592f05c96117eba85005c2d1', 'takingAmount': '7.614582', 'makingAmount': '7.309998', 'status': 'matched', 'transactionsHashes': ['0xa095272f6be923381d3d8d72dc7f68bff928d4fed0e99faa486ff3d2228c2173'], 'success': True}
>>>

5 changes: 3 additions & 2 deletions application/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def one_best_trade(self) -> None:
print(f"5. CALCULATED TRADE {best_trade}")

amount = self.agent.format_trade_prompt_for_execution(best_trade)
trade = self.polymarket.execute_market_order(market, amount)
print(f"6. TRADED {trade}")
# Please refer to TOS before uncommenting: polymarket.com/tos
# trade = self.polymarket.execute_market_order(market, amount)
# print(f"6. TRADED {trade}")

except Exception as e:
print(f"Error {e} \n \n Retrying")
Expand Down

0 comments on commit 847b72e

Please sign in to comment.