Close All Positions on Alpaca

Alpaca: Close All Positions. It runs on your own Alpaca account: connect it once in the Relvo app and Relvo adds its credentials server-side. Relvo charges no usage fee; Alpaca may bill that account under its own plan.

Try Close All Positions now

Compose the request, copy the prompt, and run it in your agent. It runs on your connected Alpaca account.

Prompt composerMarkdown
Alpacaalpaca__delete_all_open_positions
Open Relvo
Try asking

More Alpaca tools

The rest of the Alpaca shelf. Every endpoint runs on the same Alpaca connection.

49 tools
Get Accountalpaca__get_accountAlpacayour accountRetrieve Account Activitiesalpaca__get_account_activitiesAlpacayour accountRetrieve Account Activities of Specific Typealpaca__get_account_activities_by_activity_typeAlpacayour accountGet Account Configurationsalpaca__get_account_configAlpacayour accountAccount Configurationsalpaca__patch_account_configAlpacayour accountGet Account Portfolio Historyalpaca__get_account_portfolio_historyAlpacayour accountGet Assetsalpaca__get_v2_assetsAlpacayour accountGet an Asset by ID or Symbolalpaca__get_v2_assets_symbol_or_asset_idAlpacayour accountGet US Market Calendaralpaca__legacy_calendarAlpacayour accountGet US Market Clockalpaca__legacy_clockAlpacayour accountGet Option Contractsalpaca__get_options_contractsAlpacayour accountGet an option contract by ID or Symbolalpaca__get_option_contract_symbol_or_idAlpacayour accountDelete All Ordersalpaca__delete_all_ordersAlpacayour accountGet All Ordersalpaca__get_all_ordersAlpacayour accountCreate an Orderalpaca__post_orderAlpacayour accountDelete Order by IDalpaca__delete_order_by_order_idAlpacayour accountGet Order by IDalpaca__get_order_by_order_idAlpacayour accountReplace Order by IDalpaca__patch_order_by_order_idAlpacayour accountGet Order by Client Order IDalpaca__get_order_by_client_order_idAlpacayour accountClose All Positionsalpaca__delete_all_open_positionsYou are hereyour accountAll Open Positionsalpaca__get_all_open_positionsAlpacayour accountClose a Positionalpaca__delete_open_positionAlpacayour accountGet an Open Positionalpaca__get_open_positionAlpacayour accountDo Not Exercise an Options Positionalpaca__option_do_not_exerciseAlpacayour accountExercise an Options Positionalpaca__option_exerciseAlpacayour accountMint a Tokenized Assetalpaca__post_tokenization_mintAlpacayour accountList Tokenization Requestsalpaca__get_tokenization_requestsAlpacayour accountGet Tokenization Request by IDalpaca__get_tokenization_requestAlpacayour accountGet Tokenization Request by client_request_idalpaca__get_tokenization_request_by_client_request_idAlpacayour accountRetrieve Crypto Funding Walletsalpaca__list_crypto_funding_walletsAlpacayour account

Set up Close All Positions for your agent

Pick the client you use, then pick a route: Automatic is that client's own link, command or prompt, and Manual is the same install done by hand, or the tool opened in the Relvo app. Both end at the same OAuth sign-in, with nothing installed per tool.

Automatic way

Open the plugin page with the details ready.

ChatGPT takes custom MCP servers as plugins. The button opens the right page; copy the name and URL into the form and authorise once.

  1. Add a custom MCP server

    On the plugins page, click + and choose Add custom MCP server.

  2. Fill in the connection

    NameRelvo
    Connectionhttps://app.relvo.si/mcp
  3. Authorise and create

    Pick OAuth, tick the confirmation and click Create as a plugin. Approve Relvo in the browser window ChatGPT opens.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The client inspects this operation and runs it on your connected account.

Custom MCP servers are set up in ChatGPT on the web, not in the mobile app. Connect once and every chat can call Relvo.

Manual way

Set it up from ChatGPT's settings.

The same connector, reached through the settings menu instead of the plugin page.

  1. Open Apps & Connectors

    In ChatGPT, open Settings → Apps & Connectors and create a new custom connector.

  2. Name it Relvo

    NameRelvo
  3. Point it at Relvo

    Connectionhttps://app.relvo.si/mcp
  4. Authenticate

    Choose OAuth, continue, and approve Relvo in the browser. ChatGPT saves the connector to your account.

  5. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The agent checks this operation, runs it on your connection, then relays the provider's response verbatim.

  6. Open alpaca__delete_all_open_positions in the app

    URL
    https://app.relvo.si/catalog/alpaca__delete_all_open_positions

    Connect Alpaca under Connections in the Relvo app, then inspect this operation's input schema before running it.

This operation runs on your own Alpaca account. Relvo charges no usage fee; Alpaca may bill that account on its own plan.

Automatic way

One link fills in the dialog.

On a desktop browser this opens Claude's Add custom connector form with Relvo's name and MCP URL already in place. Click Add and sign in — there is nothing to type.

  1. Open the dialog

    Click the button above in the browser where you are signed in to Claude. Customize → Connectors opens with the custom-connector form ready.

  2. Add and authorise

    Click Add, then choose Sign in now under Authentication. Relvo signs you in over OAuth, so no token or API key is pasted into Claude.

  3. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The client inspects this operation and runs it on your connected account.

Manual way

The same connector, typed by hand.

Use this on a phone, in a locked-down workspace, or whenever you would rather add the connector through Claude's own menu.

  1. Open Connectors

    In Claude, go to Customize → Connectors and choose + Add → Add custom connector.

  2. Name the connector

    NameRelvo
  3. Paste the MCP URL

    Server URLhttps://app.relvo.si/mcp
  4. Sign in

    Click Add, choose Sign in now under Authentication, and approve Relvo in the OAuth window. The Relvo tools appear under the connector.

  5. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The agent checks this operation, runs it on your connection, then relays the provider's response verbatim.

  6. Open alpaca__delete_all_open_positions in the app

    URL
    https://app.relvo.si/catalog/alpaca__delete_all_open_positions

    Connect Alpaca under Connections in the Relvo app, then inspect this operation's input schema before running it.

This operation runs on your own Alpaca account. Relvo charges no usage fee; Alpaca may bill that account on its own plan.

Automatic way

One command, then one sign-in.

The CLI registers Relvo with HTTP transport and writes it into your Claude Code config; authentication happens in the browser.

  1. Run the command

    BASH
    claude mcp add --transport http relvo https://app.relvo.si/mcp
  2. Authenticate once

    Open a session and run /mcp. Choose Relvo → Authenticate; Claude Code opens Relvo's OAuth page and stores the token for the project.

  3. Check the list

    BASH
    claude mcp list

    Relvo shows as connected, with every catalog tool behind it.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The client inspects this operation and runs it on your connected account.

The command uses local scope by default. Add --scope user to make Relvo available in every project, or --scope project to share it through the repository.

Manual way

Write it into .mcp.json.

Project scope lives in a file, so the whole team gets Relvo without running a command.

  1. Add the server

    JSON · .mcp.json
    {
      "mcpServers": {
        "relvo": {
          "type": "http",
          "url": "https://app.relvo.si/mcp"
        }
      }
    }

    Create .mcp.json in the project root and add relvo as an HTTP server.

  2. Reload and sign in

    Start a Claude Code session, run /mcp, choose Relvo → Authenticate, then reload. The tools are available in that project.

  3. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The agent checks this operation, runs it on your connection, then relays the provider's response verbatim.

  4. Open alpaca__delete_all_open_positions in the app

    URL
    https://app.relvo.si/catalog/alpaca__delete_all_open_positions

    Connect Alpaca under Connections in the Relvo app, then inspect this operation's input schema before running it.

The same entry works for every project when it is added at user scope instead of project scope. This operation runs on your own Alpaca account. Relvo charges no usage fee; Alpaca may bill that account on its own plan.

Automatic way

Hand the setup to Hermes.

Hermes can edit its own config, so one instruction is enough: it writes Relvo into mcp_servers, reloads, and reports the tools it can now call.

  1. Copy the setup prompt

    PROMPT
    Add Relvo as a remote MCP server named "relvo": url https://app.relvo.si/mcp, auth oauth. Follow https://app.relvo.si/SKILL.md, reload MCP, then list the Relvo tools.
  2. Paste it into a Hermes session

    Hermes adds the remote server to ~/.hermes/config.yaml and reloads its MCP connections.

  3. Approve the sign-in

    Open the OAuth link Hermes prints and approve Relvo once. The token is cached, so later sessions do not ask again.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The client inspects this operation and runs it on your connected account.

Manual way

Add it to ~/.hermes/config.yaml.

Two settings and one reload — the same entry Hermes would write itself.

  1. Open the config

    Edit ~/.hermes/config.yaml, the file Hermes reads at start-up.

  2. Add the server

    YAML
    mcp_servers:
      Relvo:
        url: https://app.relvo.si/mcp
        auth: oauth
  3. Reload and sign in

    In a session, run /reload-mcp, then approve the OAuth prompt Hermes shows. Tokens are cached under ~/.hermes/mcp-tokens/.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The agent checks this operation, runs it on your connection, then relays the provider's response verbatim.

  5. Open alpaca__delete_all_open_positions in the app

    URL
    https://app.relvo.si/catalog/alpaca__delete_all_open_positions

    Connect Alpaca under Connections in the Relvo app, then inspect this operation's input schema before running it.

This operation runs on your own Alpaca account. Relvo charges no usage fee; Alpaca may bill that account on its own plan.

Automatic way

Hand the install to Cursor.

The button opens Cursor's MCP install dialog with the server name and URL already attached.

  1. Open the install prompt

    Click the button on the machine where Cursor is installed. Cursor receives a server named relvo pointing at https://app.relvo.si/mcp.

  2. Install and authenticate

    Confirm the install, then click Authenticate. Cursor completes Relvo's OAuth in the browser.

  3. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The client inspects this operation and runs it on your connected account.

The install link opens Cursor directly, so it does nothing in a browser that has never installed the editor.

Manual way

Edit ~/.cursor/mcp.json.

Use the global or the project file when you want the entry under your own control.

  1. Open the MCP config

    Edit ~/.cursor/mcp.json for every project, or .cursor/mcp.json inside the repository for one.

  2. Add Relvo

    JSON
    {
      "mcpServers": {
        "relvo": {
          "url": "https://app.relvo.si/mcp"
        }
      }
    }
  3. Reload Cursor

    Save the file and reload the window. Relvo appears in the MCP panel, and Authenticate finishes the sign-in.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The agent checks this operation, runs it on your connection, then relays the provider's response verbatim.

  5. Open alpaca__delete_all_open_positions in the app

    URL
    https://app.relvo.si/catalog/alpaca__delete_all_open_positions

    Connect Alpaca under Connections in the Relvo app, then inspect this operation's input schema before running it.

This operation runs on your own Alpaca account. Relvo charges no usage fee; Alpaca may bill that account on its own plan.

Automatic way

Ask the Bot to wire it up.

Grok Bot configures connections from the conversation, so the quickest route is a single instruction with Relvo's address.

  1. Copy the setup prompt

    PROMPT
    Add a custom MCP server called relvo at https://app.relvo.si/mcp with OAuth sign-in, then list the Relvo tools.
  2. Paste it into a Bot chat

    The Bot repeats the server name and URL and asks you to confirm. Check them and select Add it.

  3. Authorise

    Select Authorize on the card the Bot sends and approve Relvo in the browser once. The Bot can then call the catalog from any chat.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The client inspects this operation and runs it on your connected account.

Manual way

Name the server yourself in the chat.

Grok Bot's settings have no field for a server URL; custom MCP servers are added from the conversation.

  1. Describe the server

    NameRelvo
    Server URLhttps://app.relvo.si/mcp

    Ask the Bot to add a custom server with this name and URL. Say custom server, or it may offer a catalog plugin instead.

  2. Confirm

    The Bot repeats the name and URL. Check that the URL is https://app.relvo.si/mcp, then select Add it.

  3. Authorise

    Select Authorize on the card the Bot sends, sign in and allow access. The Relvo tools appear once you are signed in.

  4. Ask for Close All Positions

    PROMPT
    Using Relvo, call `alpaca__delete_all_open_positions` on my Alpaca connection to close all positions. Return Alpaca's response as it comes back.

    The agent checks this operation, runs it on your connection, then relays the provider's response verbatim.

  5. Open alpaca__delete_all_open_positions in the app

    URL
    https://app.relvo.si/catalog/alpaca__delete_all_open_positions

    Connect Alpaca under Connections in the Relvo app, then inspect this operation's input schema before running it.

This operation runs on your own Alpaca account. Relvo charges no usage fee; Alpaca may bill that account on its own plan.

Frequently asked questions

Short answers about the key, the price and the call itself.

Give your agent Alpaca and 147,361 tools

One token reaches your Alpaca account and every catalog tool. Start free.