Margined Protocol
Search…
⌃K

Get Funds

Have you got testnet funds?

In order to interact with the Margined Perpetuals you will need:
  • Native testnet tokens (ujunox)
  • Collateral tokens (mUSD)

Native Token

The native token, junox, will be used to pay your gas fees when interacting with the application.
Junox testnet tokens can be requested from the #faucet channel on Juno's discord. To request tokens type $request with your juno address in the message field and press enter.
Note: Instructions may change in the future for up-to-date details please go to the Juno documentation - https://docs.junonetwork.io/validators

Collateral Token

Following this you will need to get some collateral token. This is the token that will be used as collateral by the margin engine. As we are on testnet, we will use our own token: margined USD (mUSD).
The mUSD faucet is accessible through HTTP requests or directly in the trading interface.
Requests to the faucet are rate limited!

Trading Interface

First navigate to the trading interface then click on the button Faucet mUSD.
Faucet Toggle
This, once clicked you should find yourself on the faucet page where you can request funds using the box shown below.
mUSD Faucet

HTTP Request

In order to obtain mUSD using a HTTP request to our faucet, replacing `${ADDRESS}` with your address in the below.
$ curl -X POST 'https://api.margined.io/fund/${ADDRESS}'
{"logs":[{"msg_index":0,"log":"","events":[{"type":"execute","attributes":[{"key":"_contract_address","value":"juno1dxmq2c5vt5en8u9llhklhqtvzdpnl5wdfentmy8hxew2cfyu0xnquy7ac3"}]},{"type":"message","attributes":[{"key":"action","value":"/cosmwasm.wasm.v1.MsgExecuteContract"},{"key":"module","value":"wasm"},{"key":"sender","value":"juno16g2rahf5846rxzp3fwlswy08fz8ccuwk03k57y"}]},{"type":"wasm","attributes":[{"key":"_contract_address","value":"juno1dxmq2c5vt5en8u9llhklhqtvzdpnl5wdfentmy8hxew2cfyu0xnquy7ac3"},{"key":"action","value":"mint"},{"key":"to","value":"juno1qrqw3650zq7md6txk4g3pyt98vr6f02neq0krc"},{"key":"amount","value":"1000000000"}]}]}],"height":274747,"transactionHash":"582CC388A7A7A563164CA31CEB58E5AB789B449405EECE0B43E2B1B72ED393A6","gasWanted":10000000,"gasUsed":138348}
Then you can check your balance.
$ curl -X GET 'https://api.margined.io/balance/${ADDRESS}'
{"balance":"999932424"}
Note: this could also be performed using other tools such as postman.

Let's go!

Congratulations! You now have everything you need to interact with the Margined Perpetuals on the Juno testnet. Next we will show you how to open and close a position on Margined.