Type/to search
0
Follow
0
Followers
Về vấn đề lập trình giao diện API của giá thị trường Bitmex dừng lãi và dừng lỗ và đóng các vị thế sau khi kích hoạt
Help
Created 2019-04-19 13:23:53  Updated 2019-04-19 13:34:25
 4
 3028

Tôi đã tìm kiếm các bài đăng khác nhau của cộng đồng trao đổi, nhưng vẫn không có gì để làm về chức năng này.
Vì bitmex thường xuyên bị quá tải, chỉ có các đơn đặt trước được đưa vào hệ thống mới có thể giao dịch được. Ba chức năng vẽ mũi tên trên hình ảnh là rất quan trọng, nhiều người mới bắt đầu không quan tâm.
Ví dụ: nếu thiết lập 4300 phá vỡ theo dõi vào ngày 4.2, chỉ cần đặt các tùy chọn trong các tùy chọn dừng lỗ giá thị trường, mua các lỗ hổng dừng, điền số lượng và giá kích hoạt là: 4300, và không cần chọn lựa chọn thanh toán sau khi kích hoạt.
Địa chỉ yêu cầu của bitmex: https://www.bitmex.com/api/v1/order
Đơn đăng ký: Post
Yêu cầu dữ liệu:
"symbol=" & symbol & "&price=" & price & "&quantity=" & qty & "&side=Buy&ordType=StopLimit&execInst=LastPrice" & "&stopPx=" & triggerprice
Trong bài viết liên quan, lệnh đặt hàng của fmz là: var id = exchange.IO (("api", "POST", "/api/v1/order", "symbol=XBTUSD&side=Buy&orderQty=1&price=5000&execInst=ParticipateDoNotInitiate")
Vì vậy, để thực hiện giao diện hoạt động, đặt mua dừng lỗ, đặt bán dừng lỗ (hoặc đặt bán dừng, đặt mua dừng) và lệnh hoạt động của lệnh bán hàng bằng giá bán (không chọn tùy chọn) trong tùy chọn mua dừng lỗ, đặt bán dừng lỗ (hoặc đặt bán dừng, đặt mua dừng trong tùy chọn giá bán) và sau khi kích hoạt, đặt giá bán (không chọn tùy chọn này) như thế nào?
Bạn có thể giải thích bằng một ví dụ ở dạng trên không?

Related Recommendations
Comment
All comments (4)

    可以说一下具体的写法吗

    7 years ago

    经过实盘检验,可以执行了,但是模拟回测时会报错

    7 years ago

    模拟测试报错2019-04-18 00:00:00 错误 main:686:10 - TypeError: Cannot convert "POST" to int。

    7 years ago
    Order Types All orders require a symbol. All other fields are optional except when otherwise specified. These are the valid ordTypes: Limit: The default order type. Specify an orderQty and price. Market: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. Stop: A Stop Market order. Specify an orderQty and stopPx. When the stopPx is reached, the order will be entered into the book. On sell orders, the order will trigger if the triggering price is lower than the stopPx. On buys, higher. Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. Close Stops don't require an orderQty. See Execution Instructions below. StopLimit: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an orderQty, stopPx, and price. MarketIfTouched: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. LimitIfTouched: As above; use for Take Profit Limit orders.

    可以看下 BITMEX API 文档上这段描述,如果需要下 买入止损 ,卖出止盈之类的的 单子,参考设置 参数 ordTypes:
    有以下几种:
    Limit: 传统的限价单
    Market: 市价单
    Stop: 市价止损单
    StopLimit: 限价止损单
    MarketIfTouched:
    LimitIfTouched:

    7 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)