> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xmonaco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# V0.5.8

# Monaco Protocol SDK v0.5.8

## Profile Endpoint Simplification & Market Order Cleanup

This release removes extraneous fields from the `/me` profile endpoint and eliminates `timeInForce` from market orders, making both the API and SDK surface more predictable.

***

## Breaking Changes

### `/me` No Longer Returns Balances, Movements, or Orders

`GET /api/v1/accounts/me` now returns only core profile metadata. The `balances`, `recent_movements`, and `recent_orders` fields have been removed from the response.

**Before (v0.5.7):**

```json theme={null}
{
  "id": "...",
  "address": "0x...",
  "username": "trader123",
  "account_type": "master",
  "can_withdraw": true,
  "created_at": "...",
  "balances": [...],
  "recent_movements": [...],
  "recent_orders": [...]
}
```

**After (v0.5.8):**

```json theme={null}
{
  "id": "...",
  "address": "0x...",
  "username": "trader123",
  "account_type": "master",
  "can_withdraw": true,
  "created_at": "..."
}
```

Use the dedicated endpoints for account data:

| Data | Endpoint |
| - | - |
| Balances | `GET /api/v1/accounts/balances` |
| Single asset balance | `GET /api/v1/accounts/balances/{asset_id}` |
| Transaction history | `GET /api/v1/accounts/movements` |
| Orders | `GET /api/v1/orders` |

**Migration — Core SDK:**

```typescript theme={null}
// Before
const profile = await sdk.profile.getProfile();
const balances = profile.balances;
const movements = profile.recent_movements;

// After
const profile = await sdk.profile.getProfile();
const { balances } = await sdk.profile.getUserBalances({ limit: 20, offset: 0 });
const movements = await sdk.profile.getPaginatedUserMovements({ page: 1, limit: 20 });
const orders = await sdk.trading.getPaginatedOrders({ page: 1, page_size: 20 });
```

**Migration — React SDK:**

`useProfile()` now fetches balances, movements, and orders automatically when `fetchProfile()` is called, and exposes them as top-level state. No manual migration required for most consumers.

```tsx theme={null}
const {
  profile,
  balances,      // AccountBalance[] — populated by fetchProfile()
  movements,     // GetPaginatedUserMovementsResponse | undefined
  orders,        // GetPaginatedOrdersResponse | undefined
  loading,
  fetchProfile,
  getPaginatedOrders, // new — fetches orders and updates state
} = useProfile();
```

***

### `timeInForce` Removed from Market Orders

`timeInForce` is no longer accepted for market orders anywhere in the SDK. The API already rejects market orders that include `time_in_force` with a 400 error.

**Affected packages:** `@0xmonaco/types`, `@0xmonaco/core`, `@0xmonaco/react`

`timeInForce` remains fully supported on limit orders and batch order placement.

**Migration:**

```typescript theme={null}
// Before — timeInForce was silently ignored or caused an error
await sdk.trading.placeMarketOrder(pairId, "BUY", "0.5", {
  timeInForce: "IOC", // remove this
});

// After
await sdk.trading.placeMarketOrder(pairId, "BUY", "0.5", {
  slippageTolerance: 0.01, // optional, 1% max slippage
});
```

***

## Package Versions

| Package | Version |
| - | - |
| `@0xmonaco/core` | 0.5.8 |
| `@0xmonaco/react` | 0.5.8 |
| `@0xmonaco/types` | 0.5.8 |
| `@0xmonaco/mcp-server` | 0.5.8 |
| `@0xmonaco/contracts` | 0.5.8 |

```bash theme={null}
npm install @0xmonaco/core@0.5.8 @0xmonaco/react@0.5.8
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.