安全验证属性 - auth
timestamp,signature,app-id,app-uid,app-url,app-key,app-email- 所有参数都是必须的。
<legend-trade
timestamp="1587365207"
signature="0123456789ABCDEF"
app-id="Bitrue"
app-url="https=//www.bitrue.com/"
app-key="SfAS383GXed2"
app-uid="0123456789ABCDEF"
app-email="[email protected]"
></legend-trade>app-phone (可选)
- 设置一个预设的用户电话
<legend-trade app-phone="+16502683902"></legend-trade>app-state(可选)
- 设置一个状态参数,该参数会在确认交易的请求中发送给 legend 远程接口,并在相应的 webhook 中传回给外部服务。
<legend-trade app-state="ANY-STATE-IN-STRING-FORMAT"></legend-trade>测试环境 - mode
mode (可选)
- 默认值为 production。
- sandbox 用于测试环境。指定此参数,则SDK向LG沙盒环境服务器发起API请求。
- 如果是在本地测试的话,请绑定host然后访问,比如
test-legend.kucoin.local 127.0.0.1。
<legend-trade mode="sandbox"></legend-trade>产品正式上线时,请删除以上代码,或者修改其中mode=“production”。SDK会向LP产品环境的API服务器发送请求。
当您使用localhost、127.0.0.1 或 [::1] 访问本地服务调试时,将始终进入开发模式。mode="development"
多语言 - lang
lang (可选)
- 默认值为
en。 - ISO 639 language codes,
en,zh。
<legend-trade lang="zh"></legend-trade>title (可选)
- 当 title 设置为
null时,将使用面包屑导航条替换标题栏显示,以便在移动应用使用 webview 集成。
<legend-trade title="null"></legend-trade>邮箱地址 - email
email (可选)
- 默认值为
[email protected]。 - 用户获取支持的邮箱地址
<legend-trade email="[email protected]"></legend-trade>样式定制属性 - style
primary-color (可选)
<legend-trade primary-color="#1976d2"></legend-trade>secondary-color (可选)
<legend-trade secondary-color="#dc004e"></legend-trade>url-style (可选)
<legend-trade url-style="https://www.bitrue.com/assets/style.css"></legend-trade>prefers-color-scheme (可选)
dark|light- 配置深色或浅色主题。
<legend-trade prefers-color-scheme="dark"></legend-trade>交互功能配置
no-sell (可选)
- 默认值为
false。 - 不显示卖出相关的功能。
<legend-trade no-sell></legend-trade>request-for-quotation (可选)
- 请传入序列化的 JSON 字符串。
- 必须传入的字段为
crypto,amount,fiat和payment。 payment可以设置为deposit或credit_card。{"crypto":"ETH","amount":"5050","fiat":"EUR","payment":"deposit"}
<legend-trade request-for-quotation="{"crypto":"ETH","amount":"5050","fiat":"EUR","payment":"deposit"}"></legend-trade>