The main class for interacting with the Synthetix protocol. The class
requires a provider RPC endpoint and a wallet address (or a private key which is used from .env.PRIVATE_KEY)
const sdk = new SynthetixSdk({accountConfig, partnerConfig, pythConfig, rpcConfig});
await sdk.init();
The only required parameters for the SDK to initialize are the chainId and (address or env.PRIVATE_KEY).
All other parameters are optional and are set to default values if uninitialized.
const accountConfig = { address: '0x' }
const rpcConfig = { chainId: 8453, rpcEndpoint: 'https://https://base-sepolia.g.alchemy.com/v2/ALCHEMY_KEY', preset: 'andromeda'}
const sdk = new SynthetixSdk({accountConfig, rpcConfig })
const markets = await sdk.perps.getMarkets()
The main class for interacting with the Synthetix protocol. The class requires a provider RPC endpoint and a wallet address (or a private key which is used from .env.PRIVATE_KEY) const sdk = new SynthetixSdk({accountConfig, partnerConfig, pythConfig, rpcConfig}); await sdk.init();
The only required parameters for the SDK to initialize are the
chainId
and (address
orenv.PRIVATE_KEY
). All other parameters are optional and are set to default values if uninitialized. const accountConfig = { address: '0x' } const rpcConfig = { chainId: 8453, rpcEndpoint: 'https://https://base-sepolia.g.alchemy.com/v2/ALCHEMY_KEY', preset: 'andromeda'} const sdk = new SynthetixSdk({accountConfig, rpcConfig }) const markets = await sdk.perps.getMarkets()