Forkast SDK Integration Guide
6 min
welcome to the forkast sdk quickstart guide this document will walk you through the process of authenticating your account, exploring available markets, and executing your first trade installation the forkast sdk supports node js (20 x or later) and python(3 12 or later ) npm install @forkastgg/clientpip install forkast py client usage initialize the sdk to start interacting with the forkast platform, you must initialize the sdk and get access to the available services import { forkastsdk, network } from "@forkastgg/client"; // initialize the sdk const sdk = new forkastsdk(network mainnet,"your api key");import asyncio from forkast py client import forkastsdk, network async def main() async with forkastsdk(network mainnet, "your api key") as sdk market service = sdk get market service() event = await market service get event data(35) print(event) asyncio run(main()) access the services once the sdk is initialized, you can access several high level services these services are used to interact with prediction markets, user accounts, balances, and orders // get service instances const marketservice = sdk getmarketservice(); const accountservice = sdk getaccountservice(); const balancesservice = sdk getbalancesservice(); const orderservice = sdk getorderservice();market service = sdk get market service() account service = sdk get account service() balances service = sdk get balances service() order service = sdk get order service() services understanding the different functions and data structures returned by the forkast sdk is key to building reliable apps below are the core interfaces you’ll encounter when interacting with the sdk account docid\ pinero7nig 8huwwnngky balance docid 50idaidfu6 8bb5idjtam market docid\ sj9fbuzdsvjtazhskbzoc order docid\ o3dyrgrq2yp2j5vwbfvvr examples find the examples docid\ smiztc2qsfmw muwxsqyi here license mit