Obsidian Socket API Client
Installation/Setup
You will need node, and run:
npm install vertx-eventbus-client
PortfolioID
Your portfolio ID will be used for order management. You'll need to set it in the example.js
file.
You can find your portfolioID from the Jump To... > Account Settings
page.
Login
You will use a username and password (separate from your web frontend username/password) to login. This username/password combo can be found on the Account Settings page as well.
Place order
When you make a request to place an order, the system will, in the interest of expediency, only look to see that it is a well-formed order request before confirming "success". This success status means that the order was received and has been recorded. It does not mean that it has been funded, or is going on to the matching engine. For example, if you place an order that you cannot cover with available funds, it will be created, but then the status updated to cancelled_nsf
.
Order Updates
You can receive updates of your orders by subscribing to 'portfolio_orders.' + portfolioId
- so something like portfolio_orders.6807e1b4-79f8-4284-8641-62c38d8d277e
.
Note that this will only return 50 orders. If you have more than 50 orders open, well, you shouldn't right now. If that is a problem, please let us know.
Best Bid/Ask
You'll receive a stream of the Best Bid/Ask by subscribing to market.btc_usd
.
Ticker
The "ticker" will be available also in the market.btc_usd
objects - they will update each time a fill is created.