Categorygithub.com/Hongssd/mygateapi
modulepackage
0.1.3
Repository: https://github.com/hongssd/mygateapi.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Request 发送请求.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
交割合约BTC结算路径.
交割合约USDT结算路径.
No description provided by the author
合约BTC结算路径.
合约USDT结算路径.
No description provided by the author
现货公共私有频道合一.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
POST
No description provided by the author
获取用户账户信息.
查询合约账户变动历史.
获取合约账户.
查询强平历史.
查询个人成交记录.
批量取消状态为open的订单.
查询合约订单列表.
撤销单个订单.
查询单个订单详情.
合约交易下单.
查询平仓历史.
获取用户仓位列表.
获取单个仓位信息.
更新仓位杠杆.
更新仓位保证金.
更新仓位风险限额.
批量取消自动订单.
查询自动订单列表.
撤销单个自动订单.
查询单个自动订单详情.
创建价格触发订单.
查询结算记录.
查询合约账户变更历史.
获取合约账户.
获取双仓模式下的持仓信息.
更新双仓模式下的仓位杠杆.
更新双仓模式下的仓位保证金.
更新双仓模式下的仓位风险限额.
设置持仓模式.
查询个人成交记录.
查询合约订单列表.
撤销单个订单.
查询单个订单详情.
修改单个订单.
合约交易下单.
查询合约订单列表(时间区间).
获取用户仓位列表.
获取单个仓位信息.
更新仓位杠杆.
更新仓位保证金.
更新仓位风险限额.
批量取消自动订单.
查询进行中自动订单列表.
撤销单个自动订单.
查询单个自动订单详情.
创建价格触发订单.
查询杠杆账户变动历史.
获取杠杆交易账户列表.
全仓杠杆允许的最大转出.
逐仓杠杆允许的最大转出.
查询现货账户变动历史.
获取现货交易账户列表.
查询个人成交记录.
查询所有挂单.
查询订单列表.
撤销单个订单.
查询单个订单详情.
修改单个订单.
下单.
批量取消自动订单.
查询进行中自动订单列表.
撤销单个自动订单.
查询单个自动订单详情.
创建价格触发订单.
获取统一账户信息.
用户最大、最小可设置币种杠杆倍数.
获取用户币种杠杆倍数,currency不传则查询全部币种.
设置币种杠杆倍数.
获取用户风险单元详情(仅在组合保证金模式有效).
获取统一账户最多可转出.
查询统一账户模式.
设置统一账户模式.
查询个人交易费率.
查询个人账户总额.
交易账户互转.
合约市场K线图.
查询所有的合约信息.
查询单个合约信息.
查询合约市场深度信息.
获取所有合约交易中行情统计.
合约市场成交记录.
合约市场K线图.
查询所有的合约信息.
查询单个合约信息.
查询合约市场深度信息.
合约市场成交记录.
全仓杠杆支持的币种列表.
查询借贷市场列表.
查询借贷市场详情.
市场K线图.
查询所有币种信息.
查询单个币种信息.
查询支持的所有交易对.
查询单个交易对详情.
获取市场深度信息.
获取交易对ticker信息.
获取服务器当前时间.
查询市场成交记录.
No description provided by the author
No description provided by the author
订阅.
No description provided by the author
No description provided by the author
取消订阅.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
订阅间隔.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
多订阅通道合一.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
status 请求参数 string 是 基于状态查询订单列表 contract 请求参数 string 否 合约标识,如果指定则只返回该合约相关数据 limit 请求参数 integer 否 列表返回的最大数量 offset 请求参数 integer 否 列表返回的偏移量,从 0 开始 settle URL string 是 结算货币 #.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
» None object 现货单详情 »» id string 订单 ID »» text string 订单自定义信息,用户可以用该字段设置自定义 ID,用户自定义字段必须满足以下条件: 1.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
参数 名称 位置 类型 必选 描述 x-gate-exptime 请求头部 integer(int64) 否 指定过期时间(毫秒); 如果 Gate 收到请求的时间大于过期时间, 请求将被拒绝 body body Order 是 » text body string 否 订单自定义信息,用户可以用该字段设置自定义 ID,用户自定义字段必须满足以下条件: » currency_pair body string 是 交易货币对 » type body string 否 订单类型 » account body string 否 账户类型,spot - 现货账户,margin - 杠杆账户,cross_margin - 全仓杠杆账户,unified - 统一账户 » side body string 是 买单或者卖单 » amount body string 是 交易数量 » price body string 否 交易价,type=limit时必填 » time_in_force body string 否 Time in force 策略。 » iceberg body string 否 冰山下单显示的数量,不指定或传 0 都默认为普通下单。目前不支持全部冰山。 » auto_borrow body boolean 否 杠杆(包括逐仓全仓)交易时,如果账户余额不足,是否由系统自动借入不足部分 » auto_repay body boolean 否 全仓杠杆下单是否开启自动还款,默认关闭。需要注意的是: » stp_act body string 否 Self-Trading Prevention Action,用户可以用该字段设置自定义限制自成交策略。 » action_mode body string 否 处理模式: 详细描述 » text: 订单自定义信息,用户可以用该字段设置自定义 ID,用户自定义字段必须满足以下条件: 必须以 t- 开头 不计算 t- ,长度不能超过 28 字节 输入内容只能包含数字、字母、下划线(_)、中划线(-) 或者点(.) 除用户自定义信息以外,以下为内部保留字段,标识订单来源: 101 代表 android 下单 102 代表 IOS 下单 103 代表 IPAD 下单 104 代表 webapp 下单 3 代表 web 下单 2 代表 apiv2 下单 apiv4 代表 apiv4 下单 » type: 订单类型 limit : 限价单 market : 市价单 » account: 账户类型,spot - 现货账户,margin - 杠杆账户,cross_margin - 全仓杠杆账户,unified - 统一账户 统一账户(旧)只能设置 cross_margin » amount: 交易数量 type为limit时,指交易货币,即需要交易的货币,如BTC_USDT中指BTC。 type为market时,根据买卖不同指代不同 side : buy 指代计价货币,BTC_USDT中指USDT side : sell 指代交易货币,BTC_USDT中指BTC » time_in_force: Time in force 策略。 gtc: GoodTillCancelled ioc: ImmediateOrCancelled,立即成交或者取消,只吃单不挂单 poc: PendingOrCancelled,被动委托,只挂单不吃单 fok: FillOrKill,全部成交或者全部取消 type=market时仅支持ioc和fok » auto_repay: 全仓杠杆下单是否开启自动还款,默认关闭。需要注意的是: 此字段仅针对全仓杠杆有效。逐仓杠杆不支持订单级别的自动还款设置,只能通过 POST /margin/auto_repay 修改用户级别的设置 auto_borrow 与 auto_repay 支持同时开启 » stp_act: Self-Trading Prevention Action,用户可以用该字段设置自定义限制自成交策略。 用户在设置加入STP用户组后,可以通过传递 stp_act 来限制用户发生自成交的策略,没有传递 stp_act 默认按照 cn 的策略。 用户在没有设置加入STP用户组时,传递 stp_act 参数会报错。 用户没有使用 stp_act 发生成交的订单,stp_act 返回 -。 cn: Cancel newest,取消新订单,保留老订单 co: Cancel oldest,取消⽼订单,保留新订单 cb: Cancel both,新旧订单都取消 » action_mode: 处理模式: 下单时根据action_mode返回不同的字段, 该字段只在请求时有效,响应结果中不包含该字段 ACK: 异步模式,只返回订单关键字段 RESULT: 无清算信息 FULL: 完整模式(默认) #枚举值列表 参数 值 » type limit » type market » side buy » side sell » time_in_force gtc » time_in_force ioc » time_in_force poc » time_in_force fok » stp_act cn » stp_act co » stp_act cb » stp_act -.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
settle URL string 是 结算货币 contract 请求参数 string 是 合约标识 interval 请求参数 string 否 合并深度指定的价格精度,0 为不合并,不指定则默认为 0 limit 请求参数 integer 否 深度档位数量 with_id 请求参数 boolean 否 是否返回深度更新 ID。深度每发生一次变化,该 ID 自增 1.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
数据流订阅标准结构体.
授权结构体,所需签名等结构.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
数据流订阅基础客户端.
No description provided by the author
订阅请求结构体,订阅私有频道时wsAuth不可为空.
订阅返回结果,可返回正常推送数据、订阅失败结果、订阅成功结果.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
私有Rest接口.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
公共Rest接口.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author