
Product
A New Overview in our Dashboard
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
@7kprotocol/sdk-ts
Advanced tools
npm i @7kprotocol/sdk-ts
You can import the entire SDK as a module:
import SevenK from "@7kprotocol/sdk-ts";
or import specific functions as needed:
import { getQuote, buildTx } from "@7kprotocol/sdk-ts";
Configuration is optional, but if provided, it must be set before invoking any SDK functions.
If you’re calling our API from your server, contact us to request dedicated API keys and minimize the risk of rate limiting.
import { Config } from "@7kprotocol/sdk-ts";
Config.setApiKey("YOUR_API_KEY");
console.log("API key", Config.getApiKey());
import { SuiClient, getFullnodeUrl } from "@mysten/sui/client";
import { Config } from "@7kprotocol/sdk-ts";
const network = "mainnet";
const suiClient = new SuiClient({ url: getFullnodeUrl(network) });
Config.setSuiClient(suiClient);
console.log("Sui client", Config.getSuiClient());
Note: this package only supports mainnet for now.
See Swap.
See Limit Orders.
See DCA Orders.
import { getTokenPrice, getTokenPrices, getSuiPrice } from "@7kprotocol/sdk-ts";
const tokenPrice = await getTokenPrice(
"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
);
const tokenPrices = await getTokenPrices([
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
]);
const suiPrice = await getSuiPrice();
If you encounter issues when importing functions from this SDK in a Node.js environment, refer to src/examples/nodejs/ for guidance.
7K TypeScript SDK released under the MIT license. See the LICENSE file for details.
FAQs
```bash npm i @7kprotocol/sdk-ts ```
The npm package @7kprotocol/sdk-ts receives a total of 1,060 weekly downloads. As such, @7kprotocol/sdk-ts popularity was classified as popular.
We found that @7kprotocol/sdk-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.