# Reclaim the arb stake

`POST /wallet/arb/reclaim` · Lithos client API · Wallet · requires the `api_key` header

Source: https://lithosprotocol.org/docs/api/reclaim-wallet-arb-stake

Send every confirmed box at the arb address, tokens included, to this wallet's primary address in one transaction paying the 0.001 ERG fee out of those boxes. Arbitrage stops first and stays off until the client restarts, and `batching.arb.autoReserve` sends no new stake until then. Set `batching.arb.enabled = false` to keep it off after a restart.

One transaction spends at most `wallet.max-inputs` boxes, largest first; `remainingBoxes` counts the rest, which another call returns. If one of this miner's blocks spends the stake before the transaction confirms, the node refuses it and the stake is still at the arb address: call again.

## Responses

### 200: The reclaim transaction that was sent

`WalletArbReclaimResult`

- `txId` (string, required)
- `boxes` (integer · int32, required): Boxes this transaction spends
- `nanoErgs` (string, required): ERG in those boxes, before the 0.001 ERG fee. Decimal string.
- `outcome` (string, required, one of accepted, uncertain): `accepted` when the node took the transaction. `uncertain` when its answer was lost: check `GET /wallet/arb` before calling again. 
- `remainingBoxes` (integer · int32, required): Boxes left at the address for another call

### 400: No confirmed box at the arb address. Arbitrage is left running.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 403: Missing or wrong api_key

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 422: The node refused the transaction. `detail` carries its reason. Arbitrage stays off until the client restarts. 

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: Node unavailable. Nothing was sent; retry.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### default: Error

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X POST "http://localhost:9000/wallet/arb/reclaim" \
  -H "api_key: $LITHOS_API_KEY"
```

## Example response

```json
{
  "txId": "string",
  "boxes": 1,
  "nanoErgs": "10000000000",
  "outcome": "accepted",
  "remainingBoxes": 0
}
```
