Developers / 02

REST API reference

The supplied integration document identifies a production API base and two portfolio operations. These examples are operator-documented and not independently authenticated here.

Evidence scope · implementation, public chain state, third-party reports, operator disclosures

Operator documented

Base: https://api.deshare.finance/api/v1/. Use documented resource paths.

GET /portfolio/positions/{symbol}

Returns position details for one symbol. Required header: X-User-Address.

fetch(API_BASE_URL + '/portfolio/positions/AAPL', {
  headers: { accept: 'application/json', 'X-User-Address': userAddress }
});

POST /portfolio/cancel-order

The user signs the order ID. The backend verifies the recovered signer and invokes privileged cancellation.

const signature = await signer.signMessage(orderId);
fetch(API_BASE_URL + '/portfolio/cancel-order', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ order_id: orderId, signature, user_address: userAddress })
});
Not user-executed on-chain. Cancellation depends on API acceptance, owner action, receiver allowances and balances.