๐Ÿงฐ Forkast SDK Integration Guide

Learn to install and initialize the Forkast SDK for Node.js and Python, then explore markets, accounts, and orders with code examples.

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/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");

๐Ÿงฐ 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();

๐Ÿงฐ 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.

  1. Account
  2. Balance
  3. Market
  4. Order

๐Ÿ’ก Examples

Find the Examples here.

๐Ÿ“„ License

MIT