Quickstart
This guide will get you all set up and ready to use the Virtoshi API. We'll cover how to get started using one of our API clients and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of our powerful simulation engine.
Before you can make requests to the Virtoshi API, you will need to grab your API key from your dashboard. You find it under Account » Manage API Key.
Choose your client
Before making your first API request, you need to pick which API client you will use. In addition to good ol' cURL HTTP requests, Virtoshi also offers a client for JavaScript. In the following example, you can see how to install each client.
# cURL is most likely already installed on your machine
curl --version
Making your first API request
After picking your preferred client, you are ready to make your first call to the Virtoshi API. Below, you can see how to perform a POST request to the Simulation endpoint.
curl --location 'https://api.virtoshi.com/v1/simulate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY_HERE' \
--data '{
"psbt": "cHNidP8BAJ4CAAAAAu2BaIBuhpYKY8ax31ZAVZze1iismPwTPStICuMyUJtGAAAAAAD/////IGFcnPZXzaCe4qr069+JnaAVUGID33eQ4aTpIM0eipEAAAAAAP////8C09/1BQAAAAAZdqkU0MWZA8W6woaHYOkP1SGkZlqnZSCIrADh9QUAAAAAF6kUNUXm4zuDLEcFDyTT7rk8nAOUi8eHsy4TAAABAP1zAQEAAAAAAQIWVufpLOUIurGPHgB4a9DffjOONLakDOqxdhe9eVgqKwAAAABqRzBEAiAKWOL5TVIiDAJnNoZAkSxXKiyelDWS4XfK+oewWuhzsgIgY/3O56Tvx94G1pgyu3fvSlUF+GTLUYV4+ViKBiHa7+YBIQKBEgfesvGQntqodhg/eXgul85JpOiZlEtE5WrmGkWatf3///9GyQ8t/FBuZJtE3o7pLRqpV7Mdyd2Eu9TVlSpnpYU9LQEAAAAA/f///wIiAgAAAAAAABYAFL8ZFtwz291l9g2LH2XrNegSCDX8we0AAAAAAAAWABTKhnyqk4kmcURM/mMXCfgO6vLpOQACSDBFAiEA33EggHpC0Y0xm4/16ZqEJYccH/mxnlxoYrNpVlRJZMICIBXSCLOcz2TILiWJdmGQt+pK/jogMc09apJfIdZiV/mdASECGiYrH+vxWfq1/xTy1Z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, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the Virtoshi API: