Fixed

v1.1.1 - 2025-01-09

🔧 Fixed - API Header Standardization

API Key Header Casing

Standardized the API key header name to use consistent lowercase formatting:

Before:

X-APIKey: your-api-key-here

After:

x-apikey: your-api-key-here

Migration Guide

Update your API requests to use the lowercase header:

// Before
const response = await fetch('/instruments?market=ETH', {
  headers: {
    'X-APIKey': API_KEY,
    'Content-Type': 'application/json',
  },
});

// After
const response = await fetch('/instruments?market=ETH', {
  headers: {
    'x-apikey': API_KEY,
    'Content-Type': 'application/json',
  },
});

Benefits

  • Consistent Header Casing: All headers now follow lowercase convention
  • HTTP/2 Compatibility: Lowercase headers are required for HTTP/2
  • Framework Alignment: Matches standard practices across modern APIs

🔧 Fixed - WebSocket Event Types

Corrected Event Type Naming

Fixed inconsistent event type naming in WebSocket documentation:

Before:

{
  "type": "withdraw",
  "action": "withdraw"
}

After:

{
  "type": "withdrawal",
  "action": "withdrawal"
}

Migration Guide

Update your WebSocket event handlers:

// Before
ws.onmessage = (event) => {
  const message = JSON.parse(event.data);
  if (message.type === 'withdraw') {
    // Handle withdrawal event
  }
};

// After
ws.onmessage = (event) => {
  const message = JSON.parse(event.data);
  if (message.type === 'withdrawal') {
    // Handle withdrawal event
  }
};

Benefits

  • Consistency: Event types now match the implementation and enum definitions
  • Clarity: "withdrawal" is more descriptive than "withdraw"
  • Type Safety: Consistent naming improves TypeScript integration