0.0.1 • Published 2 years ago

@symmetry-hq/funds-automation-sdk v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Funds Automation Sdk

Software Development Kit for automating Symmetry Funds

Init

import { AutomationSDK } from "@symmetry-hq/funds-automation-sdk";

let automationSdk: AutomationSDK = await AutomationSDK.init(
    // rpc connection
    connection: Connection,
    // wallet
    wallet: Wallet,
    // filters (host/manager)
    filters: FilterOptions[]
    // enable logs
    enableConsoleLogs?: boolean,
);

Run

Ideally call fiveMinuteCalls every 5 minutes and hourlyCalls every hour

// fetch buy and sell states based on filters and rebalance them
// buy state will be closed if it was created more than 3 minutes ago
await automationSdk.fiveMinuteCalls(),

// fetch funds based on filters and refilter/reweight/rebalance them
// if removeDust == true, tokens with valu < 0.005 USDC
// and target weight = 0 will be removed from fund.
await automationSdk.hourlyCalls(removeDust?: boolean),