Alpaca and BTCPay Server Integration
Demonstration of how apps are integrated in WEXTL workflow builder[4]
Keep Alpaca and BTCPay Server matched by integrating their events and actions. When finance events happen in Alpaca, update the BTCPay Server automatically - without any line of code in visual workflow builder.
- 3-day trial
- Cancel anytime
- Up to 10 minutes quick set up
- GDPR
- Data Encryption
- 2FA
- Local Data Region
Learn about Alpaca and BTCPay Server
Detailed info you need to know about Alpaca and BTCPay Server integrations in WEXTL. Explore which modules apps support and how you connect them.
Alpaca

Trading and market data API for stocks, options and crypto.[5]
BTCPay Server

Self-hosted Bitcoin payments: invoices, payment requests, payouts, stores, webhooks and lightning.[6]
How to connect Alpaca to BTCPay Server
Set up your Alpaca and BTCPay Server integration in 3 simple steps[2]. No coding required. Up to 10 minutes setup.
STEP 1
Connect Alpaca and BTCPay Server
Save credentials in WEXTL once. We store them encrypted and reuse the authorization across every workflow[3]. No coding or API skills required.
STEP 2
Build a workflow
Paste selected Alpaca and BTCPay Server nodes onto the canvas[4], or describe what you want and WEXTL wires the flow together with AI Builder.
STEP 3
Map your data
Choose which fields need to sync between Alpaca and BTCPay Server. Use filters or a JS custom code step in between. Everything is on the canvas.
How does the integration between Alpaca and BTCPay Server work in WEXTL?
WEXTL exposes actions and triggers for Alpaca and BTCPay Server that help you connect apps and automate repetitive tasks[1]. A trigger is an event that happens, and an action is a step that performs when the event has occurred.
Alpaca triggersBTCPay Server actions
Alpaca modules
- Add an Asset to a Watchlist Puts one more Symbol on a watchlist. The updated watchlist is returned with its Name and Assets.
- Cancel All Orders Cancels every open order in the account once Confirm is turned on. Each canceled order is its own result with its ID and Status.
- Cancel an Order Cancels one open order and returns its ID.
- Close a Position Exits an open position in full, or by a Quantity or a Percentage of it. A partial close places a market order, labeled with your Client Order ID.
- Close All Positions Closes every open position. Turn on Cancel Open Orders First to clear pending orders beforehand, and Confirm to go ahead.
- Create a Locate Asks Alpaca to locate a Quantity of shares of a Symbol for shorting. Turn on All or None to reject a partial fill and use Limit Price for the highest fee you accept.
- Create a Multi-Leg Options Order Places one options order across several Legs, each made of a Contract Symbol, Ratio Quantity and Side. The whole order takes a Quantity, Order Type and Time in Force.
- Create a Watchlist Saves a new watchlist called Name, optionally filled with Symbols.
- Create a Whitelisted Address Approves a crypto wallet Address for withdrawals of an Asset on a Chain, with optional beneficiary details for the travel rule.
- Create an Order Submits an order for a Symbol as a market, limit, stop, stop limit or trailing stop. Use Quantity or Notional for the size and Order Class for a bracket, OCO or OTO.
- Delete a Watchlist Deletes a watchlist and returns its ID.
- Delete a Whitelisted Address Deletes an approved withdrawal address from the account.
- Do Not Exercise an Option Position Tells Alpaca to let an option position expire without exercising it, returning its Symbol.
- Exercise an Option Position Exercises an option position you hold and returns its Symbol with a Success flag.
- Get a Corporate Action Announcement Fetches one announcement by ID, with its Ca Type, Ca Sub Type, Cash amount and Declaration Date.
- Get a Crypto Transfer Fetches one wallet transfer, including its Amount, Asset, Chain and Direction.
- Get a Crypto Transfer Estimate Quotes the Fee and Network Fee of moving an Amount of an Asset between a From Address and a To Address.
- Get a Locate Reads one locate request by Locate ID and shows its Status, Located Quantity and Total Fee.
- Get a Logo Downloads the company logo for a Symbol as a File with its Content Type. Turn on Placeholder If Missing to get a stand-in image.
- Get a Position Shows one open position with its Avg Entry Price and Asset Class.
- Get a Stock Snapshot Takes a current picture of one Symbol with its Daily Bar, Latest Quote, Latest Trade and Prev Daily Bar.
- Get a Tokenization Request Fetches one tokenization request by its ID, including what Fees were charged.
- Get a Tokenization Request by Client Request ID Finds a tokenization request from the Client Request ID that was attached when minting, and shows its full record.
- Get a Watchlist Opens one watchlist and shows its Name and Assets.
- Get Account Configurations Reads the trading settings of the account, such as Fractional Trading, Max Margin Multiplier and No Shorting.
- Get an Asset Looks up an asset by Symbol or Asset ID and returns its Class, Exchange, CUSIP and Borrow Status.
- Get an Option Chain Snapshots the contracts on an Underlying Symbol, with Greeks, Implied Volatility and the Latest Quote. Narrow by Type, Strike Price From, Strike Price To or Expiration Date.
- Get an Option Contract Retrieves one contract with its Expiration Date, Close Price and Deliverables.
- Get an Order Fetches one order by Order ID with its Client Order ID, Created At and Asset Class. Turn on Nest Multi-Leg Orders to show the legs inside it.
- Get an Order by Client Order ID Finds an order from the Client Order ID you attached when placing it, so a custom reference leads to the full order.
- Get Latest Crypto Orderbooks Shows the current order book of crypto pairs in a chosen Location, listing Asks and Bids. Use Limit to set the depth.
- Get Locate Quotes Quotes the Available Quantity and Price of shares you could locate for each of the Symbols.
- Get Option Condition Codes Looks up what each trade condition code means for a Tick Type on options.
- Get Option Exchange Codes Lists the exchange codes that appear in options data, so a code can be read as an exchange name.
- Get Portfolio History Charts account value over time, one row per window with Timestamp, Equity, Profit Loss and Profit Loss Pct. Use Period for a lookback, or Start and End for exact dates, and Timeframe for the window size.
- Get Stock Auctions Pulls the opening and closing auctions of one ticker from a Start date through to the End. Use Sort to put them in oldest or newest order.
- Get Stock Bars Reads historical bars of one ticker at the chosen Timeframe, with High, Low, Close and Trade Count. Use Adjustment to account for splits and dividends.
- Get Stock Condition Codes Explains the condition codes of trades or quotes for a Tick Type on one Tape.
- Get Stock Exchange Codes Lists the exchange codes that appear in stock data, with the exchange each one stands for.
- Get Stock Quotes Reads historical bid and ask quotes of one ticker, with Ask Exchange and Ask Price. Use Sort to order them and Start with End to bound the period.
- Get Stock Trades Reads historical trades of one ticker with Trade ID, Price and Size, across a period from Start to End.
- Get the Account Pulls the trading account and reports its Account Number, Buying Power and Accrued Fees, along with whether it is blocked.
- Get the Latest Stock Bar Fetches the newest bar for one Symbol with its High, Low, Close and Trade Count. Switch Feed or Currency for another source or currency.
- Get the Latest Stock Quote Shows the latest best bid and ask for one Symbol, with Ask Price, Ask Size and Bid Price.
- Get the Latest Stock Trade Reads the most recent trade of one Symbol, with its Price, Size and Conditions.
- Get the Market Calendar Lists trading days for a Market from Start to End, with Core Start, Core End and Lunch Start. Use Time Zone to read times in your own zone.
- Get the Market Clock Shows whether markets are open now, or at a chosen Time, with Phase, Next Market Open and Next Market Close. Use Markets for several codes.
- List Account Activities Lists account events such as fills and transfers. Filter with Activity Types, Category, Order Id or a Date range using After and Until, and set Direction.
- List Assets Lists the assets that match Status, Asset Class, Exchange or Attributes.
- List Corporate Action Announcements Lists announcements of the chosen Types from Since until Until. Add Symbol or CUSIP to follow one security and Date Type to choose which date is matched.
BTCPay Server modules
- Activate an Invoice Payment Method Turns on one payment method of an invoice, such as BTC-CHAIN or BTC-LN, for payment.
- Add a Store User Gives a user access to a store through a Role. Name the user by id or email, and turn on Require Invitation to send an invitation first.
- Approve a Payout Approves a pending payout. Use Revision to guard against edits made meanwhile and Rate Rule to convert with a custom rate. A failed approval is not retried automatically.
- Approve a User Approves a user account on the server. Turn off Approved to withdraw an approval again.
- Archive a Payment Request Archives a payment request of a store so it is taken out of the active ones.
- Archive a Pull Payment Stops further claims on a pull payment by archiving it.
- Archive an Invoice Hides an invoice from the default invoice lists.
- Broadcast a Wallet Transaction Sends a signed Transaction in raw form to the network through the on-chain Payment Method of a store. Failures here are not retried automatically.
- Cancel a Payout Cancels a payout that has not been sent yet.
- Cancel a Store Invitation Withdraws a pending invitation to a store.
- Connect to a Lightning Peer Joins a Lightning node, either the server node or a store node, to another peer. Write the peer address as nodeid@host:port.
- Create a Lightning Invoice Creates a BOLT11 invoice on a Lightning node for an Amount (millisats). Use Expiry (seconds) to set its lifetime and Private Route Hints to include private channels.
- Create a Payment Request Issues a request for payment in a store using a Title and an Amount. Add an Expiry Date, a Reference ID or Allow Custom Payment Amounts.
- Create a Pull Payment Sets up a pull payment of a total Amount in a Currency. Use Payout Methods to limit how claims are paid and Auto Approve Claims to skip manual approval. A failed setup is not retried automatically.
- Create a Pull Payment Payout Claims a payout against a pull payment, sent to a Destination through a Payout Method ID. Leave Amount empty to claim the rest. A failed claim is not retried automatically.
- Create a Store Starts a store named Name. Set Website, Default Currency or Brand Color to shape how it looks and behaves.
- Create a Store Payout Queues a payout out of store funds to a Destination for an Amount. Turn on Approved to approve it at once, or attach it to a Pull Payment ID. A failed attempt is not retried automatically.
- Create a User Creates an account from an Email. Use Password to set one, Is Administrator for admin rights and Send Invitation Email to invite the user.
- Create a Wallet Transaction Builds an on-chain transaction to Destinations. By default it signs and BROADCASTS it, which spends funds. Turn off Broadcast to avoid sending. A failed run is not retried automatically.
- Create a Webhook Makes BTCPay Server call an Endpoint URL when store events occur. Use Events to restrict which, and Secret to sign every delivery.
- Create an API Key Makes an API key for your own account. Use Label to name it and Permissions to restrict what it can do. You read the API Key value once.
- Create an API Key for a User Makes an API key on behalf of another user. Use Label to name it and Permissions to limit the access it grants.
- Create an App Attaches an app to a store under an App Name, of a chosen App Type. Use Notification URL to receive payment notices.
- Create an Invoice Issues an invoice in a store for an Amount and Currency. Set Buyer Email to tie it to a customer and Order ID to match your own order. If the run fails, it is not retried automatically.
- Create an Offering Adds a subscription offering to a store under a Name. Use Features for a JSON list and Success Redirect URL to send customers elsewhere after signing up.
- Create an Offering Plan Adds a plan to a subscription Offering with a Name, Price and Currency. Use Recurring Type to set the renewal cycle and Trial Days for a free start.
- Delete a File Deletes an uploaded file on BTCPay Server.
- Delete a Notification Removes one notification from your inbox.
- Delete a Store Removes a store from BTCPay Server.
- Delete a Store Payment Method Disconnects a payment option from your store.
- Delete a Subscriber Deletes one subscriber of an offering. Use Customer Selector to say which.
- Delete a User Deletes a BTCPay Server user account.
- Delete a Webhook Detaches a webhook from a store.
- Delete an App Deletes an app from a store in BTCPay Server.
- Delete the Current User Deletes the account of the user that owns the credential. Turn on Confirm Deletion to proceed.
- Get a File Reads an uploaded file with its Original Name and URL.
- Get a Lightning Address Reads a Lightning address of a store by Username. You see its Min, Max and Invoice Metadata.
- Get a Lightning Deposit Address Generates an on-chain Address that tops up a Lightning node.
- Get a Lightning Invoice Reads an invoice from a Lightning node by Lightning Invoice ID, including its BOLT11 string and a Status that tells whether it was paid.
- Get a Lightning Node Balance Reads how much funds a Lightning node holds, split into two parts by Onchain and Offchain.
- Get a Lightning Node Info Reads a Lightning node and its Alias, Version, Block Height and Peers Count.
- Get a Lightning Payment Fetches one payment of a Lightning node by Payment Hash. It shows the Status and Preimage.
- Get a Notification Opens one notification from your inbox with its Type, Body and Link.
- Get a Payment Request Retrieves a payment request with its Title, Amount and Expiry Date.
- Get a Payout Checks a payout and shows its Destination, Revision and Original Currency.
- Get a Pull Payment Loads a pull payment with its Amount, Currency and BOLT11 Expiration.
- Get a Pull Payment LNURL Gives the LNURL for a pull payment in two forms, LNURL Bech32 and LNURL URI.
- Get a Pull Payment Payout Reads a single payout that was claimed against a pull payment, with its Destination and Date.
- Get a Rate Configuration Shows how a store converts rates, with the Spread, the Preferred Source and the Effective Script.
- Get a Store Reads a store with its Name, Website and Logo URL.
Explore alternative integrations
There are other apps[9] supported by WEXTL that can be paired with Alpaca and BTCPay Server integrations. Pick any from the list below if the current combination isn't the one you need.
Frequently asked questions
Common questions about connecting Alpaca and BTCPay Server.
References
List of sources used to gather information about the Alpaca and BTCPay Server integration.
- Alpaca and BTCPay Server integration source code, module specs and credentials implementation.
- Our Alpaca and BTCPay Server integration documentation, structured input and output parameters, scopes, and authentication methods.
- Official vendor API documentation for Alpaca and BTCPay Server, used to verify field meanings, authentication flows, and anything our own specs don't fully capture.
- WEXTL® visual workflow builder, anonymized data from our technical support team.
- Alpaca integration information
- BTCPay Server integration information
- WEXTL® Scheduling
- WEXTL® Pricing and Trial
- WEXTL® Apps Library
How we write our apps documentation
Explore how WEXTL® crafted Alpaca and BTCPay Server integration page documentation. Used sources, the role of AI, and how the team validates the result.