Skip to content

feat:Truemarkets action provider (ts) #614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

phdargen
Copy link
Contributor

@phdargen phdargen commented Mar 26, 2025

Description

Adds TrueMarketsActionProvider to interact with Truemarkets prediction markets on Base.
The following actions are implemented:

  • get_active_markets: Get active prediction markets from Truemarkets

    • Returns a list of markets with their ID, contract address and market question
    • Supports pagination and sorting options
  • get_market_details: Get detailed information for a specific market

    • Takes a market address as input
    • Returns market information including:
      • Market question, source, and status
      • Pool addresses and liquidity
      • YES/NO token prices
      • Pool balances and TVL

Tests

Chatbot: typescript/examples/langchain-cdp-chatbot/chatbot.ts
Network: Base Mainnet

Prompt: list 10 newest truemarkets
-------------------
Found 10 active markets (out of 288 total):

Market #287 (0x3749004e6ea844F011E3163e6f512bF24E189845): March Madness Champs: Lipsomb
Market #286 (0x30e44cecCf101509617221F748BF952da9FE1b43): March Madness Champs: San Diego State
Market #285 (0xAA4d127cA2Df59C04FD2A2F07D699b317DA00b41): March Madness Champs: American
Market #284 (0xC02192126f4C3144989e725036AF1AdB0fC581c5): March Madness Champs: Mount St. Mary's
Market #283 (0xeFcA36aa198b715439cF4e5dB61aE9E7e60405a2): March Madness Champs: Texas
Market #282 (0x5e071a67fe67D025cb940D377cD7826b65b95C87): March Madness Champs: Saint Francis
Market #281 (0x9f4Cf99Bb7a7B4187D12d8E2fE2b34b2d63fe188): March Madness Champs: Bryant
Market #280 (0xd773067Eee88f990274a0817fCE9119EE86eDD51): March Madness Champs: UNC Wilmington
Market #279 (0x169a20D641Ec1C4B7A27602ef3B1da46B547E331): March Madness Champs: Grand Canyon
Market #278 (0x3b05AB8843D1866CbdEf7f20e7E605a5903d7ccB): March Madness Champs: Colorado State

Prompt: get info about market 0x3749004e6ea844F011E3163e6f512bF24E189845
-------------------
Market Details for 0x3749004e6ea844F011E3163e6f512bF24E189845:

Question: March Madness Champs: Lipsomb
Additional Info: This market will resolve to "Yes" if the team in the market question wins the 2025 NCAA Men’s Basketball Tournament. Otherwise this market will resolve to "No." If for any reason no tournament winner is declared by May 31, 2025, 11:59 PM PST, this market will resolve to "No."
Source: Official NCAA channels
Status: Finalized
Earliest possible resolution: 2025-03-19T16:00:00.000Z

YES: $0.02
NO: $0.99

TVL: $147.20Pool Addresses:
- YES Pool: 0x367446980DA342791fb6653dB968C058b04F14E6 (Pool Size: $3.39)
- NO Pool: 0x5A26B0aCc48b211E393BC60D2E8d0B5500CA532C (Pool Size: $143.81)
-------------------

Checklist

A couple of things to include in your PR for completeness:

  • Added documentation to all relevant README.md files
  • Added a changelog entry

@phdargen phdargen requested a review from murrlincoln as a code owner March 26, 2025 22:24
@cb-heimdall
Copy link

cb-heimdall commented Mar 26, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions bot added documentation Improvements or additions to documentation action provider New action provider example New example agent typescript labels Mar 26, 2025
@phdargen phdargen marked this pull request as draft March 26, 2025 22:24
@github-actions github-actions bot removed the example New example agent label Apr 15, 2025
@phdargen phdargen marked this pull request as ready for review April 15, 2025 08:06
@phdargen phdargen changed the title WIP:Truemarkets action provider (ts) feat:Truemarkets action provider (ts) Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action provider New action provider documentation Improvements or additions to documentation typescript
Development

Successfully merging this pull request may close these issues.

2 participants