@binance/broker-portal-sdk

中文文档
1.0.16发布于 2024/04/29MITTypeScriptESM + CJS近 30 天下载 2647
  1. You are not on any trade or economic sanctions lists, such as the UN Security Council Sanctions list, designated as a “Specially Designated National” by OFAC (Office of Foreign Assets Control of the U.S. Treasury Department) or placed on the U.S. Comme
原始使用文档
文档目录6 节
  1. @binance/broker-portal-sdk
  2. How to start
  3. Start in 5 minutes
  4. HTML
  5. React usage
  6. Parameters

@binance/broker-portal-sdk

  1. You are not on any trade or economic sanctions lists, such as the UN Security Council Sanctions list, designated as a “Specially Designated National” by OFAC (Office of Foreign Assets Control of the U.S. Treasury Department) or placed on the U.S. Commerce Department’s “Denied Persons List”.

  2. You are not providing any restricted/prohibited business that could constitute illegal, unlawful activities.

How to start

If you are interested in the Portal Tool, please fill the application form or contact [email protected]. Binance team members will reach out via Telegram or Email to help you with onboarding.

Start in 5 minutes

If you have got your broker_id, please add the codes below and input your

HTML

<script src="https://public.bnbstatic.com/static/js/broker-sdk/[email protected]"></script>
<div id="widget"></div>
<script>
    window.onload = function () {
        window.binanceBrokerPortalSdk.initBrokerSDK('#widget', {
            apiHost: 'https://www.binance.com',
            brokerId: 'your-broker-id'
        })
    }
</script>

finally, check the Jump link has the params ref, like this: https://www.binance.com/en?source=broker-sdk&ref=xxx

React usage

import { initBrokerSDK } from '@binance/broker-portal-sdk'
const app = () => {
    React.useEffect(() => {
        initBrokerSDK('#test', {
            apiHost: 'https://www.binance.com',
            brokerId: 'your-broker-id'
        })
    }, [])
    return <div id="test"></div>
}

Parameters

initBrokerSDK(el, {
    apiHost,
    brokerId,
    site,
    overrideStyle,
    slideTime,
    target,
})
  • el: string | string[] required

    DOM selector

  • options.apiHost: string required

    API host, you can use https://www.binance.com by default

  • options.brokerId: string required

    Your broker id

  • options.site: "global" | "site" optional

    Site of jump links, default set to global

  • options.overrideStyle: string optional

    Customize style by pure CSS code, eg:

    .bnc-broker-widget-footer{height: 20px;} /* change style of widget footer */
    
  • options.slideTime: number optional

    Delay between slide transitions(in ms), default set to 5000

  • options.target: "_self" | "_blank" | "_parent" | "top" optional

    target attribute of link, default set to "_self"

版本与发布记录

@binance/broker-portal-sdk 共发布 19 个版本,首次发布于 2021/06/02;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.16latest2024/04/292 年前
1.0.152023/07/253 年前
1.0.142023/02/143 年前
0.0.0-dev.e0f3bbe2022/10/254 年前
0.0.0-dev.5fb14d42022/10/254 年前
1.0.132022/10/194 年前

关于 @binance/broker-portal-sdk 的常见问题

@binance/broker-portal-sdk 是什么?

You are not on any trade or economic sanctions lists, such as the UN Security Council Sanctions list, designated as a “Specially Designated National” by OFAC (Office of Foreign Assets Control of the U.S. Treasury Department) or placed on the U.S. Comme

如何安装 @binance/broker-portal-sdk?

在项目目录运行 npm install @binance/broker-portal-sdk,或使用 pnpm add / yarn add / bun add。

@binance/broker-portal-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@binance/broker-portal-sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@binance/broker-portal-sdk 可以商用吗?

@binance/broker-portal-sdk 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@binance/broker-portal-sdk 的下载量有多少?

根据 npm 官方下载统计,@binance/broker-portal-sdk 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,647 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@binance/broker-portal-sdk 还在维护吗?

最新版本 1.0.16 发布于 2024/04/29(2 年前);至今共发布 19 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/06/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。