API 常見問答
可通過行情接口獲取上述公式數據:https://www.okx.com/docs-v5/zh/#order-book-trading-market-data-get-ticker(last-open24h)/ open24h。七、下單時報錯:51000 Parameter posSide error 是什麼原因? 需要先檢查一下賬戶模式:開平倉模式/買賣模式,可通過:OKX API接入指南,獲取posMode查看。 1、在開平倉模式且使用合約下單情況下,posSide 參數必填,填寫 long 或 short 。 開多:買入開多(side 填寫 buy; posSide 填寫 long ) 開空:賣出開空(side 填寫 sell; posSide 填寫 short ) 平多:賣出平多(side 填寫 sell;posSide 填寫 long ) 平空:買入平空(side 填寫 buy; posSide 填寫 short ) 注:組合保證金模式下,交割和永續僅支持買賣模式。 2、如果是買賣模式,或者是在開平倉模式下進行現貨、槓桿交易posSide僅支持傳入net或者是不傳。
發佈於 2024年9月20日更新於 2026年3月23日133