Archived | Place trades through your online broker using simple API calls
Build a web app for making online financial security trades with an integrated broker API
Financial markets change rapidly at a moment’s notice, so it’s critical for people who are immersed in this industry to be in control and connected to their investments at all times. Historically, this has been a challenge because there isn’t a common framework among brokerages and financial institutions that enables them to make trading decisions and process transactions quickly and without hassle. TradeIT does just that by providing an API infrastructure that links retail investors and app developers with any online financial broker. When coupled with IBM’s own tools for managing investments, rebalancing and building portfolios, and projecting future earnings — this process strengthens the connections between users and their investments.
Nobody likes losing money in the market. Investors want to be informed at all times about the current state of the market and need to be ready to make trades at a moment’s notice. Imagine you are a financial institution that wants to provide its client base with the capability to trade stocks, exchange-traded funds, and currencies without having to leave your platform and manage relationships with external brokerage firms. To achieve this, you need a way to securely integrate with online brokers for your users and allow them to make trades directly and seamlessly with their connected accounts. TradeIT enables these capabilities by providing an API infrastructure that links retail investors and financial institutions with online financial brokers.
This code pattern shows you how to create a web application built on Node.js that integrates with the TradeIt APIs to give users an end-to-end way of making trades (buying or selling securities) against a mock brokerage. The application showcases the workflow of a customer authenticating themselves against this mock broker, and placing trades through them securely. After selecting the specific options for the trade, the user is returned a summary of a trade ticket to review, and receives the order number and confirmation of the trade.
This code pattern is for developers who want to start building applications with TradeIt integration. When you have completed this code pattern, you will understand how to:
- Build a Node.js web application that’s integrated with the TradeIt SDK.
- Store user authentication sessions to allow for multiple trades while signed in.
- Issue multiple trades based on portfolio optimization results
- User enters the web app and selects a broker from the available integrations.
- User enters their credentials to link with the broker.
- User selects his account for transactions and proceeds to the trading ticket to fill in information regarding the trade to be made, like the ticker name, stock quantity, and whether the trade is a buy or a sell.
- User reviews the details of the trade and confirms the trade.
- Trade details are then sent to the broker and a confirmation code is returned to the user.
- User can proceed to make another trade which takes him back to the trading ticket.
- User can securely log out of the session with the broker and go back to the homepage.
Find the detailed steps for this pattern in the README. Those steps will show you how to manually deploy your app to a local machine:
- Set up your machine.
- Clone the repository.
- Create the Investment Portfolio service.
- Configure the .env file.
- Create the TradeIt service.
- Run the application with NPM.