npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bluefin-exchange/bluefin7k-aggregator-sdk

v6.0.0

Published

```bash npm i @bluefin-exchange/bluefin7k-aggregator-sdk ```

Readme

Bluefin7k Aggregator TypeScript SDK

Installation

npm i @bluefin-exchange/bluefin7k-aggregator-sdk

This package requires @pythnetwork/pyth-sui-js as a peer dependency. If your project does not have it, you need to install it.

npm i @pythnetwork/pyth-sui-js

Usage

You can import the entire SDK as a module:

import SevenK from "@bluefin-exchange/bluefin7k-aggregator-sdk";

or import specific functions as needed:

import { getQuote, buildTx } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

Config

Configuration is optional, but if provided, it must be set before invoking any SDK functions.

Set API Key

You can use our SDK with a default rate limit of 5 requests per second without needing an API key.

  • For frontend (in-browser) usage, no API key is required, and the rate limit cannot be increased.

  • For backend (server-side) usage, the API key is optional for default usage. However, to request a higher rate limit, you must provide both an API key and partner information.

To request a rate limit increase, please submit your request at our Discord. Create a ticket to request an API key for Bluefin7k Aggregator.

| Usage | API Key Required | Default Rate Limit | Can Request Higher Rate Limit | | -------- | ------------------------------------- | ------------------------------- | -------------------------------------------- | | Frontend | No | 5 requests/second | No | | Backend | Optional (required to increase limit) | 5 requests/second (without key) | Yes (requires API Key & partner information) |

import { Config } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

Config.setApiKey("YOUR_API_KEY");
console.log("API key", Config.getApiKey());

Set BluefinX API key

Setting a BluefinX API key is optional. However, if you'd like to use one — for example, to avoid rate limits when routing through BluefinX — you'll need to request an API key directly from Bluefin.

import { Config } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

Config.setBluefinXApiKey("YOUR_BLUEFINX_API_KEY");
console.log("BluefinX API key", Config.getBluefinXApiKey());

Set Sui Client

The SDK uses two separate Sui clients:

  • Primary client — Accepts any ClientWithCoreApi implementation (gRPC, JSON-RPC, or GraphQL). Set via setSuiClient. Defaults to gRPC for best performance.
  • JSON-RPC client (SuiJsonRpcClient) — Required by @pythnetwork/pyth-sui-js for Pyth price feed operations. Set separately via setJsonRpcClient if you need to customize the endpoint.

Using gRPC (Recommended)

import { SuiGrpcClient } from "@mysten/sui/grpc";
import { Config } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

const network = "mainnet";

// Primary client for transaction execution, simulation, and coin fetching
const suiClient = new SuiGrpcClient({
  baseUrl: "https://fullnode.mainnet.sui.io:443",
  network,
});
Config.setSuiClient(suiClient);

Using JSON-RPC

import { SuiJsonRpcClient, getJsonRpcFullnodeUrl } from "@mysten/sui/jsonRpc";
import { Config } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

const network = "mainnet";

const suiClient = new SuiJsonRpcClient({
  url: getJsonRpcFullnodeUrl(network),
  network,
});
Config.setSuiClient(suiClient);

Configuring Pyth Sui Client

import { SuiJsonRpcClient, getJsonRpcFullnodeUrl } from "@mysten/sui/jsonRpc";
import { Config } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

const jsonRpcClient = new SuiJsonRpcClient({
  url: getJsonRpcFullnodeUrl("mainnet"),
  network: "mainnet",
});
Config.setJsonRpcClient(jsonRpcClient);

Note: this package only supports mainnet.

Set Endpoint Provider (API Version)

You can toggle between different API versions:

  • "Bluefin7k" (default) - Uses v2/quote endpoint
  • "Bluefin7kV2" - Uses v3/quote endpoint with RFQ support
import { Config } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

// Use v2 API (default)
Config.setEndpointProvider("Bluefin7k");

// Use v3 API with RFQ support
Config.setEndpointProvider("Bluefin7kV2");

Swap

See Swap.

BluefinX

See BluefinX.

Limit Orders

See Limit Orders.

DCA Orders

See DCA Orders.

Prices

import { getTokenPrice, getTokenPrices, getSuiPrice } from "@bluefin-exchange/bluefin7k-aggregator-sdk";

const tokenPrice = await getTokenPrice(
  "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
);

const tokenPrices = await getTokenPrices([
  "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
  "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
]);

const suiPrice = await getSuiPrice();

Miscellaneous

If you encounter issues when importing functions from this SDK in a Node.js environment, refer to src/examples/nodejs/ for guidance.

License

Bluefin7k Aggregator TypeScript SDK released under the MIT license. See the LICENSE file for details.