Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 154 additions & 57 deletions core/api-doc-config.generated.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

131 changes: 129 additions & 2 deletions sdks/python/API_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,133 @@ exchange.has
```


---
### `get_auth_nonce`

Override in subclasses to force specific capability values.


**Signature:**

```python
def get_auth_nonce(wallet_address: str) -> AuthNonceResponse:
```

**Parameters:**

- `wallet_address` (str): The wallet address to authenticate

**Returns:** AuthNonceResponse - Result

**Example:**

```python
exchange.get_auth_nonce(wallet_address="...")
```


---
### `login_with_signature`

Login with a signed nonce to obtain session credentials.


**Signature:**

```python
def login_with_signature(wallet_address: str, signature: str, nonce: str) -> AuthLoginResponse:
```

**Parameters:**

- `wallet_address` (str): The wallet address
- `signature` (str): The signature of the nonce message
- `nonce` (str): The nonce that was signed

**Returns:** AuthLoginResponse - Result

**Example:**

```python
exchange.login_with_signature(wallet_address="...", signature="...", nonce="...")
```


---
### `logout`

Logout and invalidate the current session.


**Signature:**

```python
def logout(wallet_address: Optional[str] = None) -> None:
```

**Parameters:**

- `wallet_address` (str) - **Optional**: The wallet address to logout (optional)

**Returns:** None - Result

**Example:**

```python
exchange.logout(wallet_address="...")
```


---
### `is_session_active`

Check if a session is active for the given wallet address.


**Signature:**

```python
def is_session_active(wallet_address: str) -> bool:
```

**Parameters:**

- `wallet_address` (str): The wallet address to check

**Returns:** bool - Result

**Example:**

```python
exchange.is_session_active(wallet_address="...")
```


---
### `get_session`

Get the stored session for a wallet address.


**Signature:**

```python
def get_session(wallet_address: str) -> Optional[AuthSession]:
```

**Parameters:**

- `wallet_address` (str): The wallet address

**Returns:** Optional[AuthSession] - Result

**Example:**

```python
exchange.get_session(wallet_address="...")
```


---
### `load_markets`

Expand Down Expand Up @@ -1172,12 +1299,12 @@ Compare live prices for the same market across venues. Finds identity matches an
**Signature:**

```python
def compare_market_prices(params: FetchMatchesParams) -> List[PriceComparison]:
def compare_market_prices(params: CompareMarketPricesParams) -> List[PriceComparison]:
```

**Parameters:**

- `params` (FetchMatchesParams): Match filter parameters (uses relation: 'identity' internally)
- `params` (CompareMarketPricesParams): Match filter parameters (uses relation: 'identity' internally)

**Returns:** List[[PriceComparison](#pricecomparison)] - Array of price comparisons across venues

Expand Down
131 changes: 129 additions & 2 deletions sdks/typescript/API_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,133 @@ exchange.has
```


---
### `getAuthNonce`

Override in subclasses to force specific capability values.


**Signature:**

```typescript
async getAuthNonce(walletAddress: string): Promise<AuthNonceResponse>
```

**Parameters:**

- `walletAddress` (string): The wallet address to authenticate

**Returns:** Promise<AuthNonceResponse> - Result

**Example:**

```typescript
await exchange.getAuthNonce("...")
```


---
### `loginWithSignature`

Login with a signed nonce to obtain session credentials.


**Signature:**

```typescript
async loginWithSignature(walletAddress: string, signature: string, nonce: string): Promise<AuthLoginResponse>
```

**Parameters:**

- `walletAddress` (string): The wallet address
- `signature` (string): The signature of the nonce message
- `nonce` (string): The nonce that was signed

**Returns:** Promise<AuthLoginResponse> - Result

**Example:**

```typescript
await exchange.loginWithSignature("...", "...", "...")
```


---
### `logout`

Logout and invalidate the current session.


**Signature:**

```typescript
async logout(walletAddress?: string): Promise<void>
```

**Parameters:**

- `walletAddress` (string) - **Optional**: The wallet address to logout (optional)

**Returns:** Promise<void> - Result

**Example:**

```typescript
await exchange.logout({ walletAddress: "..." })
```


---
### `isSessionActive`

Check if a session is active for the given wallet address.


**Signature:**

```typescript
async isSessionActive(walletAddress: string): Promise<boolean>
```

**Parameters:**

- `walletAddress` (string): The wallet address to check

**Returns:** Promise<boolean> - Result

**Example:**

```typescript
await exchange.isSessionActive("...")
```


---
### `getSession`

Get the stored session for a wallet address.


**Signature:**

```typescript
async getSession(walletAddress: string): Promise<AuthSession | undefined>
```

**Parameters:**

- `walletAddress` (string): The wallet address

**Returns:** Promise<AuthSession | undefined> - Result

**Example:**

```typescript
await exchange.getSession("...")
```


---
### `loadMarkets`

Expand Down Expand Up @@ -1174,12 +1301,12 @@ Compare live prices for the same market across venues. Finds identity matches an
**Signature:**

```typescript
async compareMarketPrices(params: FetchMatchesParams): Promise<PriceComparison[]>
async compareMarketPrices(params: CompareMarketPricesParams): Promise<PriceComparison[]>
```

**Parameters:**

- `params` (FetchMatchesParams): Match filter parameters (uses relation: 'identity' internally)
- `params` (CompareMarketPricesParams): Match filter parameters (uses relation: 'identity' internally)

**Returns:** Promise<[PriceComparison](#pricecomparison)[]> - Array of price comparisons across venues

Expand Down
1 change: 1 addition & 0 deletions sdks/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"unified"
],
"dependencies": {
"decimal.js": "^10.6.0",
"pmxt-core": "2.17.1",
"ws": "^8.18.0"
},
Expand Down
Loading
Loading