@cranberry-money/shared-constants
Version:
Shared constants for Blueberry platform
74 lines • 2.44 kB
JavaScript
export const ORDER_TYPE = {
BUY: 'BUY',
SELL: 'SELL',
};
export const ORDER_STATUS = {
OPEN: 'OPEN',
PARTIALLY_FILLED: 'PARTIALLY_FILLED',
MATCHED: 'MATCHED',
PENDING_SIGNATURE: 'PENDING_SIGNATURE',
COMPLETED: 'COMPLETED',
CANCELLED: 'CANCELLED',
EXPIRED: 'EXPIRED',
};
export const SWAP_STATUS = {
CREATED: 'created',
SELLER_SIGNED: 'seller_signed',
BUYER_SIGNED: 'buyer_signed',
READY: 'ready',
EXECUTING: 'executing',
COMPLETED: 'completed',
FAILED: 'failed',
EXPIRED: 'expired',
};
export const SWAP_USER_ROLE = {
SELLER: 'seller',
BUYER: 'buyer',
};
export const ARCA_ENDPOINTS = {
TOKENS: {
LIST: '/public/v1/tokens/',
DETAIL: (uuid) => `/public/v1/tokens/${uuid}/`,
ORDER_BOOK: (uuid) => `/public/v1/tokens/${uuid}/order-book/`,
MARKET_DATA: (uuid) => `/public/v1/tokens/${uuid}/market-data/`,
},
ORDERS: {
LIST: '/public/v1/orders/',
DETAIL: (uuid) => `/public/v1/orders/${uuid}/`,
CREATE: '/public/v1/orders/create/',
CREATE_MESSAGE: '/public/v1/orders/create/message/',
CANCEL: (uuid) => `/public/v1/orders/${uuid}/cancel/`,
CANCEL_MESSAGE: (uuid) => `/public/v1/orders/${uuid}/cancel/message/`,
MODIFY: (uuid) => `/public/v1/orders/${uuid}/modify/`,
MODIFY_MESSAGE: (uuid) => `/public/v1/orders/${uuid}/modify/message/`,
MODIFICATIONS: (uuid) => `/public/v1/orders/${uuid}/modifications/`,
SWAP: (uuid) => `/public/v1/orders/${uuid}/swap/`,
SWAP_SIGN: (uuid) => `/public/v1/orders/${uuid}/swap/sign/`,
SWAP_APPROVAL_STATUS: (uuid) => `/public/v1/orders/${uuid}/swap/approval-status/`,
SWAP_APPROVAL_DATA: (uuid) => `/public/v1/orders/${uuid}/swap/approval-data/`,
},
WALLETS: {
BALANCES: '/public/v1/wallets/balances/',
},
SWAPS: {
LIST: '/public/v1/swaps/',
},
STABLECOINS: {
LIST: '/public/v1/stablecoins/',
},
TRANSACTIONS: {
LIST: '/public/v1/transactions/',
},
TRANSFERS: {
PREPARE: '/public/v1/transfers/prepare/',
BROADCAST: '/public/v1/transfers/broadcast/',
},
WHITELIST: {
STATUS: (address) => `/public/v1/whitelist/${address}/status/`,
},
};
export const TRADING_CONFIG = {
ORDER_BOOK_REFRESH_INTERVAL: 30000,
DEFAULT_ORDER_EXPIRY_DAYS: 7,
};
//# sourceMappingURL=trading.js.map