quickstart-studio-sdk

Quickstart: Studio SDK

Use algo-dsl to build the same search-and-hydration algorithms that Console generates.

Install

npm install algo-dsl

Create a feed algorithm

import { StudioV1 } from "algo-dsl";

export default async function algo({ apiKey }) {
  const mbd = new StudioV1({ apiKey });

  return mbd
    .search()
    .index("polymarket-items")
    .include()
    .numeric("volume_24hr", 1000)
    .notNull("question")
    .sortBy("volume_24hr", "desc")
    .size(25)
    .execute();
}

This matches the current Console builder flow:

  1. Search a supported index.
  2. Hydrate the rows with .include().
  3. Return output for preview, feed configs, or notification configs.

There is no separate feature, scoring, or ranking step in the current Console builder.

Create a notification algorithm

import { StudioV1 } from "algo-dsl";

export default async function notificationAlgo({ apiKey }) {
  const mbd = new StudioV1({ apiKey });

  return mbd
    .search()
    .index("dex-notifications")
    .include()
    .inAppUsers("wallet_address")
    .notNull("user_id")
    .sortBy("timestamp", "desc")
    .size(50)
    .execute();
}

Supported index names

Use the index names shown in Console's algo dropdown:

  • polymarket-trades
  • polymarket-items
  • hyperliquid-trades
  • base-trades
  • ethereum-trades
  • solana-trades
  • token-items
  • hyperliquid-items
  • hyperliquid-notifications
  • dex-notifications
  • polymarket-notifications
  • kalshi-notifications
  • wallet-users
  • hyperliquid-wallets
  • polymarket-wallets

See Supported Indices for details.

Next steps

  • Save and test algorithms in Console.
  • Attach feed algorithms to Feed Configs.
  • Attach notification algorithms to Notifications.