跳转到主要内容
POST
/
withdraw
/
open
/
institution
/
otc
/
api
/
v1
/
quote
获取 OTC 入金报价
curl --request POST \
  --url https://openplatform.gateapi.io/withdraw/open/institution/otc/api/v1/quote \
  --header 'Content-Type: application/json' \
  --header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
  --header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
  --header 'X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "cryptoCurrency": "USDT",
  "fiatCurrency": "USD",
  "side": "FIAT",
  "type": "BUY"
}
'
{
  "code": "0",
  "status": "success",
  "errorMessage": "",
  "data": {
    "quoteToken": "qt_01JXYZABCDEF",
    "validPeriod": 60,
    "cryptoAmount": "1088.42",
    "fiatAmount": "1000",
    "fiatRate": "0.918762",
    "cryptoRate": "1.088420"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.gate.com/llms.txt

Use this file to discover all available pages before exploring further.

概述

本页说明 OTC 入金与出金共用的报价接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

说明

  • 认证方式使用 GatePay 标准签名请求头。
  • 使用 type=BUY 表示入金,使用 type=SELL 表示出金。
  • 本页展示同一接口的机构路径版本。
  • 除创建子账户、查询子账户详情、分页查询子账户外,机构侧请求需携带 X-GatePay-On-Behalf-Of
  • 通用签名规则请参见 /api-reference/version/100/cn/common/securityAndSignature

请求头

X-GatePay-Certificate-ClientId
string
必填

用于标识调用应用的商户应用 ClientId。

X-GatePay-Signature
string
必填

按 GatePay 签名规则生成的 HMAC 签名。

X-GatePay-Timestamp
string
必填

用于防重放和验签的 Unix 时间戳。

X-GatePay-Nonce
string
必填

与时间戳配合使用的随机串,用于防止重放攻击。

X-GatePay-On-Behalf-Of
string
必填

必填代理归属请求头。请填写本次请求的发起方账户 ID;在机构代理商户 API 中通常填写目标子账户 ID,在机构代扣与划转接口中可填写机构账户 ID 或子账户 ID。

查询参数

bankAccountName
string

银行账户名称,用于模糊查询。

iban
string

账号或 IBAN,用于模糊查询。

swift
string

SWIFT,用于模糊查询。

bankName
string

银行名称,用于模糊查询。

请求体

application/json
cryptoCurrency
string
必填

询价中使用的数字货币币种代码。入金支持:USDT、USDC;出金支持:USDT、USDC。

fiatCurrency
string
必填

询价中使用的法币币种代码。当前支持:USD。

side
string
必填

询价方向。CRYPTO 表示按数字货币数量询价,FIAT 表示按法币数量询价。

type
string
必填

OTC 业务类型。BUY 表示入金,SELL 表示出金。

cryptoAmount
string

按数字货币数量询价时使用的数字货币金额。

fiatAmount
string

按法币数量询价时使用的法币金额。

promotionCode
string

业务支持时可传的优惠码。

响应

200 - application/json

成功

code
string

业务响应码。

status
string

请求顶层状态。

errorMessage
string

请求失败时的错误信息。

data
object

报价响应数据。