Why Postman: Postman allows easy sending of RPC requests to an AtomicDEX-API instance launched by the AtomicDEX Desktop application through a friendly GUI
Prerequisites: Download and install the latest versions of AtomicDEX Desktop and Postman on your computer
On AtomicDEX Desktop:
-
Start the application and login to your wallet
-
Click the settings button on the bottom left part of the application
-
Under the
Security
section, clickShow
on the line that saysView seed and private keys
-
Input your password and click
View
in the dialog box that pops out
-
Click the copy button beside
RPC Password
to copy it. ThisRPC Password
is also referred to asuserpass
. It is reset every time the AtomicDEX Desktop application is restarted
-
Save the
userpass
value to a text file for later usage and leave the AtomicDEX Desktop application running
On Postman:
-
Launch the application. If it is your first time launching it, you will see a screen similar to the following. Click the
Skip and go to the app
link to skip account creation/login
-
Click the “Eye icon” in the top right part of the screen to create a new
Environment
3)In the popout dialog menu, Click the Add
button in the Environment section
-
In the new tab that opens, change the Environment’s name to AtomicDEX and add variables as shown in the next step
-
Add a variable with the name
userpass
and for its value, paste theRPC password
value copied and saved from AtomicDEX Desktop. Then, add another variable with the nameurl
and set its value aslocalhost:7783
and save as shown in the picture below
-
Change environment to AtomicDEX by clicking on the dropdown that says
No Environment
beside the eye icon and selectingAtomicDEX
-
Click
New
to start creating a new RPC request
-
In the popout menu, select
HTTP Request
-
Select
Post
as the request type
-
Input
{{url}}
in the input bar besidePOST
-
Next select
Body
→raw
→JSON
as shown in the picture below
-
In the text area available, you can input the data part of any of the RPC requests from the docs. Example: version | Komodo Documentation
The RPC call looks like:
curl --url "http://127.0.0.1:7783" --data "{
\"method\":\"version\",
\"userpass\":\"$userpass\"
}"
the --data
part is:
"{
\"method\":\"version\",
\"userpass\":\"$userpass\"
}"
remove the quotes outside the brackets, replace escaped quotes: \"
with regular quotes: "
and $userpass
with {{userpass}}
you will get:
{
"method":"version",
"userpass":"{{userpass}}"
}
input it in the text area and click the Send button to receive output from the AtomicDEX-API instance launched by the AtomicDEX Desktop application
The same method can be used to execute any other RPC command from the docs at Note About Rational Number Type | Komodo Documentation
Note: Everytime the AtomicDEX Desktop application is restarted, the RPC password
/userpass
is also reset. So copy it and update the value of the userpass
variable in the environment named AtomicDEX
in Postman