Skip to content

Commit

Permalink
moving #TODOs to github issues for new developers to try contributing!
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnicita committed Aug 8, 2024
1 parent b3b9614 commit e6b56e9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions application/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,10 @@ def one_best_trade(self) -> None:
filtered_markets = self.agent.filter_markets(markets)
print(f"4. FILTERED {len(filtered_markets)} MARKETS")

# TODO: use even more data to build even better models!
# orderbooks = [self.polymarket.get_orderbooks(m) for m in markets]
# orderbooks = self.agent.filter_orderbooks()

market = filtered_markets[0]
best_trade = self.agent.source_best_trade(market)
print(f"5. CALCULATED TRADE {best_trade}")

# TODO: explore more complex trading logic!
amount = self.agent.format_trade_prompt_for_execution(best_trade)
trade = self.polymarket.execute_market_order(market, amount)
print(f"6. TRADED {trade}")
Expand Down
3 changes: 1 addition & 2 deletions connectors/polymarket.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ def execute_market_order(self, market, amount) -> str:
resp = self.client.post_order(signed_order, orderType=OrderType.FOK)
print(resp)
print("Done!")
# TODO: write trade history to a db!
return resp

def get_usdc_balance(self) -> float:
Expand All @@ -368,7 +367,7 @@ def test():
api_key=os.getenv("CLOB_API_KEY"),
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
) # TODO: post /auth/api-key
)
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

Expand Down

0 comments on commit e6b56e9

Please sign in to comment.