├── .nvmrc ├── public ├── .nojekyll ├── img │ ├── favicon.ico │ ├── og-image.png │ ├── pattern.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── fireblocks │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ └── 4.png │ └── logo.svg ├── og-images │ ├── faq.png │ ├── home.png │ ├── sdks.png │ ├── changelog.png │ ├── glossary.png │ ├── platform │ │ ├── oauth.png │ │ ├── overview.png │ │ ├── webhook.png │ │ ├── colocation.png │ │ ├── oauth │ │ │ └── usage.png │ │ └── self-trade-prevention.png │ ├── public │ │ ├── http-v1.png │ │ ├── http-v2.png │ │ ├── http-v4.png │ │ └── websocket.png │ ├── guides │ │ ├── fireblocks.png │ │ └── client-order-id.png │ └── private │ │ ├── http-auth.png │ │ ├── websocket.png │ │ ├── http-main-v4.png │ │ ├── http-trade-v1.png │ │ └── http-trade-v4.png ├── fonts │ ├── Inter-Bold.ttf │ └── Inter-Regular.ttf ├── robots.txt ├── sitemap.xml ├── _redirects ├── manifest.json ├── sitemap-0.xml └── data │ └── changelog.json ├── pages ├── index.mdx ├── changelog.mdx ├── public │ ├── _meta.js │ └── http-v2.mdx ├── platform │ ├── oauth │ │ ├── _meta.js │ │ └── overview.mdx │ ├── _meta.js │ ├── colocation.mdx │ ├── overview.mdx │ ├── self-trade-prevention.mdx │ └── webhook.mdx ├── private │ ├── _meta.js │ └── http-auth.mdx ├── _document.tsx ├── guides │ ├── _meta.js │ └── fireblocks.mdx ├── sdks.mdx ├── _meta.js ├── _app.tsx └── faq.mdx ├── .eslintrc.json ├── postcss.config.mjs ├── lib ├── utils.ts ├── urls.ts └── region-context.tsx ├── next-env.d.ts ├── components ├── ui │ ├── skeleton.tsx │ ├── textarea.tsx │ ├── label.tsx │ ├── input.tsx │ ├── badge.tsx │ ├── scroll-area.tsx │ ├── tabs.tsx │ ├── card.tsx │ ├── button.tsx │ ├── table.tsx │ ├── data-table.tsx │ └── select.tsx ├── regional-base-url-text.tsx ├── regional-base-url.tsx ├── method-label.tsx ├── inline-region-selector.tsx ├── regional-url.tsx ├── region-selector.tsx ├── error-code-selector.tsx ├── alert.tsx ├── region-segmented-control.tsx ├── playground │ ├── message-composer.tsx │ ├── connection-controls.tsx │ ├── index.tsx │ └── message-log.tsx ├── regional-disclaimer.tsx ├── api-endpoint.tsx ├── pages │ └── home-page.tsx └── log-viewer.tsx ├── .gitignore ├── next-sitemap.config.cjs ├── types ├── logs.ts └── websocket.ts ├── constants.ts ├── components.json ├── next.config.ts ├── config ├── regions.ts └── websocket.ts ├── tsconfig.json ├── package.json ├── tailwind.config.ts ├── global.css ├── scripts └── generate-og-images.tsx ├── theme.config.tsx └── seo.config.ts /.nvmrc: -------------------------------------------------------------------------------- 1 | 22 2 | -------------------------------------------------------------------------------- /public/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/index.mdx: -------------------------------------------------------------------------------- 1 | import HomePage from "@/components/pages/home-page"; 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/favicon.ico -------------------------------------------------------------------------------- /public/img/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/og-image.png -------------------------------------------------------------------------------- /public/img/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/pattern.png -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "next/core-web-vitals", 4 | "next/typescript" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /pages/changelog.mdx: -------------------------------------------------------------------------------- 1 | import ChangelogPage from "@/components/pages/changelog-page"; 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/og-images/faq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/faq.png -------------------------------------------------------------------------------- /public/og-images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/home.png -------------------------------------------------------------------------------- /public/og-images/sdks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/sdks.png -------------------------------------------------------------------------------- /public/fonts/Inter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/fonts/Inter-Bold.ttf -------------------------------------------------------------------------------- /public/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/fireblocks/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/fireblocks/1.png -------------------------------------------------------------------------------- /public/img/fireblocks/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/fireblocks/2.png -------------------------------------------------------------------------------- /public/img/fireblocks/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/fireblocks/3.png -------------------------------------------------------------------------------- /public/img/fireblocks/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/img/fireblocks/4.png -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/fonts/Inter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/fonts/Inter-Regular.ttf -------------------------------------------------------------------------------- /public/og-images/changelog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/changelog.png -------------------------------------------------------------------------------- /public/og-images/glossary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/glossary.png -------------------------------------------------------------------------------- /public/og-images/platform/oauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/platform/oauth.png -------------------------------------------------------------------------------- /public/og-images/public/http-v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/public/http-v1.png -------------------------------------------------------------------------------- /public/og-images/public/http-v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/public/http-v2.png -------------------------------------------------------------------------------- /public/og-images/public/http-v4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/public/http-v4.png -------------------------------------------------------------------------------- /public/og-images/guides/fireblocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/guides/fireblocks.png -------------------------------------------------------------------------------- /public/og-images/platform/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/platform/overview.png -------------------------------------------------------------------------------- /public/og-images/platform/webhook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/platform/webhook.png -------------------------------------------------------------------------------- /public/og-images/private/http-auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/private/http-auth.png -------------------------------------------------------------------------------- /public/og-images/private/websocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/private/websocket.png -------------------------------------------------------------------------------- /public/og-images/public/websocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/public/websocket.png -------------------------------------------------------------------------------- /public/og-images/platform/colocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/platform/colocation.png -------------------------------------------------------------------------------- /public/og-images/guides/client-order-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/guides/client-order-id.png -------------------------------------------------------------------------------- /public/og-images/platform/oauth/usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/platform/oauth/usage.png -------------------------------------------------------------------------------- /public/og-images/private/http-main-v4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/private/http-main-v4.png -------------------------------------------------------------------------------- /public/og-images/private/http-trade-v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/private/http-trade-v1.png -------------------------------------------------------------------------------- /public/og-images/private/http-trade-v4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/private/http-trade-v4.png -------------------------------------------------------------------------------- /public/og-images/platform/self-trade-prevention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitebit-exchange/api-docs/HEAD/public/og-images/platform/self-trade-prevention.png -------------------------------------------------------------------------------- /pages/public/_meta.js: -------------------------------------------------------------------------------- 1 | const meta = { 2 | "http-v1": "API v1", 3 | "http-v2": "API v2", 4 | "http-v4": "API v4", 5 | "websocket": "WebSocket API" 6 | }; 7 | 8 | export default meta; 9 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # * 2 | User-agent: * 3 | Allow: / 4 | 5 | # Host 6 | Host: https://docs.whitebit.com 7 | 8 | # Sitemaps 9 | Sitemap: https://docs.whitebit.com/sitemap.xml 10 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /pages/platform/oauth/_meta.js: -------------------------------------------------------------------------------- 1 | const meta = { 2 | "overview": { 3 | title: "Overview", 4 | }, 5 | "usage": { 6 | title: "Usage", 7 | }, 8 | }; 9 | 10 | export default meta; 11 | -------------------------------------------------------------------------------- /public/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://docs.whitebit.com/sitemap-0.xml 4 | -------------------------------------------------------------------------------- /pages/private/_meta.js: -------------------------------------------------------------------------------- 1 | const meta = { 2 | "http-auth": "API Authentication", 3 | "http-main-v4": "Main API v4", 4 | "http-trade-v1": "Trade API v1", 5 | "http-trade-v4": "Trade API v4", 6 | "websocket": "WebSocket API" 7 | }; 8 | 9 | export default meta; 10 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. 7 | -------------------------------------------------------------------------------- /pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from 'next/document' 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /pages/guides/_meta.js: -------------------------------------------------------------------------------- 1 | const meta = { 2 | "client-order-id": { 3 | title: "Client Order ID", 4 | theme: { 5 | breadcrumb: false, 6 | }, 7 | }, 8 | "fireblocks": { 9 | title: "Fireblocks", 10 | theme: { 11 | breadcrumb: false, 12 | }, 13 | }, 14 | }; 15 | 16 | export default meta; 17 | -------------------------------------------------------------------------------- /components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /pages/platform/_meta.js: -------------------------------------------------------------------------------- 1 | const meta = { 2 | "overview": { 3 | title: "Overview", 4 | theme: { 5 | toc: false, 6 | layout: "full" 7 | } 8 | }, 9 | "self-trade-prevention": "Self Trade Prevention", 10 | "colocation": "Colocation", 11 | "webhook": "Webhook", 12 | "oauth": "OAuth" 13 | }; 14 | 15 | export default meta; 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Production 2 | /build 3 | .idea 4 | 5 | # Generated files 6 | .docusaurus 7 | .cache-loader 8 | 9 | # Misc 10 | .DS_Store 11 | .env.local 12 | .env.development.local 13 | .env.test.local 14 | .env.production.local 15 | 16 | npm-debug.log* 17 | yarn-debug.log* 18 | yarn-error.log* 19 | /.next/ 20 | /out/ 21 | node_modules 22 | .cursorrules 23 | -------------------------------------------------------------------------------- /components/regional-base-url-text.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { useRegionConfig } from "@/lib/region-context"; 5 | 6 | /** 7 | * Returns the API base URL as plain text (not a link) for use within code blocks. 8 | */ 9 | export function RegionalBaseUrlText() { 10 | const config = useRegionConfig(); 11 | return <>{config.apiBaseUrl}; 12 | } 13 | -------------------------------------------------------------------------------- /next-sitemap.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next-sitemap').IConfig} */ 2 | module.exports = { 3 | siteUrl: 'https://docs.whitebit.com', 4 | generateRobotsTxt: true, 5 | generateIndexSitemap: true, 6 | robotsTxtOptions: { 7 | additionalSitemaps: [], 8 | policies: [ 9 | { 10 | userAgent: '*', 11 | allow: '/', 12 | }, 13 | ], 14 | }, 15 | changefreq: 'weekly', 16 | priority: 0.8, 17 | } 18 | -------------------------------------------------------------------------------- /types/logs.ts: -------------------------------------------------------------------------------- 1 | export interface TradePayload { 2 | market: string 3 | amount?: string 4 | price?: string 5 | side: 'buy' | 'sell' 6 | clientOrderId?: string 7 | stopPrice?: string 8 | activation_price?: string 9 | type?: 'stop' | 'stop_limit' 10 | timeInForce?: 'GTC' | 'IOC' 11 | orderId?: string 12 | } 13 | 14 | export interface ApiLog { 15 | id: string 16 | timestamp: string 17 | path: string 18 | payload: TradePayload 19 | statusCode: number 20 | } 21 | 22 | -------------------------------------------------------------------------------- /public/img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /constants.ts: -------------------------------------------------------------------------------- 1 | const isProduction = process.env.NODE_ENV === "production"; 2 | 3 | export const PROTOCOL_HTTPS = "https://"; 4 | export const PROTOCOL_WSS = "wss://"; 5 | 6 | export const URL_TYPE_API = "api" as const; 7 | export const URL_TYPE_WS = "ws" as const; 8 | export const URL_TYPE_MAIN = "main" as const; 9 | 10 | export type UrlType = typeof URL_TYPE_API | typeof URL_TYPE_WS | typeof URL_TYPE_MAIN; 11 | 12 | export { type Region, REGIONS, DEFAULT_REGION, REGION_GLOBAL, REGION_EU } from "@/config/regions"; 13 | -------------------------------------------------------------------------------- /components/regional-base-url.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { useRegionConfig } from "@/lib/region-context"; 5 | 6 | /** 7 | * Returns the API base URL as a clickable link. 8 | */ 9 | export function RegionalBaseUrl() { 10 | const config = useRegionConfig(); 11 | return ( 12 | 18 | {config.apiBaseUrl} 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "global.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /public/_redirects: -------------------------------------------------------------------------------- 1 | # Authentication & OAuth redirects 2 | /oauth /platform/oauth/overview/ 301 3 | 4 | # API Documentation redirects 5 | /webhook /platform/webhook/ 301 6 | 7 | # Infrastructure redirects 8 | /colocation /platform/colocation/ 301 9 | 10 | # Platform documentation redirects 11 | /overview /platform/overview/ 301 12 | 13 | # Wildcard redirects 14 | /oauth/* /platform/oauth/overview/ 301 15 | /webhook/* /platform/webhook/ 301 16 | /colocation/* /platform/colocation/ 301 17 | /overview/* /platform/overview/ 301 18 | -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |