account_set_position_mode

Switch between net position mode and long/short hedge mode. net: one position per instrument (default). long_short_mode: separate long and short positions. [CAUTION] Requires no open positions or pending orders.

Server Okx Trade @okx_ai/okx-trade-mcp
Category Write
Risk class Medium
Parameters 11 required

What account_set_position_mode does on Okx Trade

AI agents use account_set_position_mode to create or update resources in Okx Trade — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Okx Trade environment.

ParameterTypeRequiredDescription
posMode string Yes long_short_mode=hedge; net_mode=one-way

Parameters from the server's own tool schema.

Why account_set_position_mode needs a policy

This tool writes/modifies account trading configuration settings reversibly. While it doesn't move money directly (Financial category), it fundamentally alters how positions are managed in the account, which could affect trading behavior and risk exposure. The operation is reversible (can switch back), so it's Write rather than Destructive.

From the tool's definition Tool modifies account configuration state by switching position modes (net mode vs long/short hedge mode). Description explicitly states it 'Switch between' modes, indicating a state change operation.

Questions about account_set_position_mode

What does the account_set_position_mode tool do? +

Switch between net position mode and long/short hedge mode. net: one position per instrument (default). long_short_mode: separate long and short positions. [CAUTION] Requires no open positions or pending orders. It is categorised as a Write tool in the Okx Trade MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

What parameters does account_set_position_mode accept? +

account_set_position_mode accepts 1 parameter: posMode. Required: posMode. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on account_set_position_mode? +

Register the Okx Trade MCP server in PolicyLayer and add a rule for account_set_position_mode: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Okx Trade. Nothing to install.

What risk level is account_set_position_mode? +

account_set_position_mode is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit account_set_position_mode? +

Yes. Add a rate_limit block to the account_set_position_mode rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block account_set_position_mode completely? +

Set action: deny in the PolicyLayer policy for account_set_position_mode. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides account_set_position_mode? +

account_set_position_mode is provided by the Okx Trade MCP server (@okx_ai/okx-trade-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.