API 常見問答
十三、接口報錯:50101 APIKey does not match current environment 這個是因為 API key 和當前環境不匹配導致的,實盤調用需要使用實盤 API key ,且請求的header 裡面 x-simulated-trading這個參數值需要為 0 ;模擬盤調用需要使用模擬盤 API key ,且請求的 header 裡面 x-simulated-trading 這個參數值需要為 1 。十四、接口報錯:51010 Request unsupported under current account mode 這個跟您的賬戶模式有關係,如果您要下單現貨槓桿或合約,需要調整為除現貨模式外的其他3種模式!您可以通過接口:https://www.okx.com/docs-v5/zh/#trading-account-rest-api-set-position-mode 設置,也可以在網頁或 App 上設置;注意:首次設置必須要在頁面或 App 上設置:交易頁面右上角設置圖標-賬戶模式。
發佈於 2024年9月20日更新於 2026年3月23日133