Forkast Developer Docs
...
Market
Get Event Data
2 min
fetches detailed information for a single event by its eventid useful when a user selects a event and you need full event metadata import { forkastsdk, network } from "@forkastgg/client"; import type { event } from "@forkastgg/client/dist/types/market"; const sdk = new forkastsdk(network testnet, "your api key"); const marketservice = sdk getmarketservice(); const event event = await marketservice geteventdata("event id"); parameters field type required description eventid number yes event identifier, should be greater than 0 get specific market each event will have one or more than one markets you could access a specific market and the outcome id to access order book // we can access specific index from the array const market = eventdata markets\[index]; const outcomeid = market outcomes\[index] id; const outcometype = market outcomes\[index] outcometype;