> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/testnet/autonity.md).

# Autonity

### Get setup to access your CAX account

Install

```
sudo apt install snapd
sudo apt install python3-pip
pip install httpie==3.2.2
http --version
```

Get API KEY

```
MESSAGE=$(jq -nc --arg nonce "$(date +%s%N)" '$ARGS.named')
aut account sign-message $MESSAGE message.sig -k $HOME/.autonity/keystore/tresure.key > message.sig
echo -n $MESSAGE | https https://cax.piccadilly.autonity.org/api/apikeys api-sig:@message.sig
```

```
KEY=API_KEY
```

View your tresure.key wallet balance

```
aut account info -k $HOME/.autonity/keystore/tresure.key
```

## View off-chain CAX balance

```
https GET https://cax.piccadilly.autonity.org/api/balances/ API-Key:$KEY
```

## Deposit USDC to CAX

```
aut token transfer --token 0x3a60C03a86eEAe30501ce1af04a6C04Cf0188700 0x11F62c273dD23dbe4D1713C5629fc35713Aa5a94 USDC_AMOUNT | aut tx sign - | aut tx send -
```

## View orderbooks

```
https GET https://cax.piccadilly.autonity.org/api/orderbooks/ API-Key:$KEY
```

## Getting current price of NTN-USDC

```
https GET https://cax.piccadilly.autonity.org/api/orderbooks/NTN-USDC/quote API-Key:$KEY
```

## Buy NTN with limit-order

```
https POST https://cax.piccadilly.autonity.org/api/orders/ API-Key:$KEY pair=NTN-USDC side=bid price=NTN_PRICE amount=NTN_AMOUNT
```

## Check order (Enter order ID from previous step)

```
https GET https://cax.piccadilly.autonity.org/api/orders/ORDER_ID API-Key:$KEY
```

## Cancel open order

```
https DELETE https://cax.piccadilly.autonity.org/api/orders/ORDER_ID API-Key:$KEY
```

## Withdraw

```
https POST https://cax.piccadilly.autonity.org/api/withdraws API-Key:$KEY symbol=NTN  amount=NTN_AMOUNT
```

## Bond NTN to validator

```
aut validator bond --validator VALIDATOR_ADDRESS NTN AMOUNT | aut tx sign - | aut tx send -
```

Or&#x20;

```
aut validator bond <Amount> | aut tx sign - | aut tx send -
```

## Unbond&#x20;

```
aut validator unbond --validator <VALIDATOR_IDENTIFIER_ADDRESS> <AMOUNT> | aut tx sign - | aut tx send -
```

Transfer USDC&#x20;

```
aut token transfer --token 0x3a60C03a86eEAe30501ce1af04a6C04Cf0188700 0x799af677770d436b265af0b851ad38f04f2b167a 999996 | aut tx sign - | aut tx send -
```
