Constructors
constructor
-
new PublicClient(__namedParameters: { url: string | URL }): PublicClient
-
Parameters
-
__namedParameters:
{ url: string | URL }
Methods
fetch
-
fetch(url: string | URL,
__namedParameters?: { headers: undefined | Headers | Record<string, string> | Iterable<[string, string]> | Iterable<Iterable<string>>; options: options }): Promise<unknown>
-
Parameters
-
url: string | URL
-
Default value
__namedParameters:
{ headers: undefined | Headers | Record<string, string> | Iterable<[string, string]> | Iterable<Iterable<string>>; options: options } = {}
-
headers: undefined | Headers | Record<string, string> | Iterable<[string, string]> | Iterable<Iterable<string>>
-
Returns Promise<unknown>
getCandles
-
Parameters
-
__namedParameters:
{ instrument: string; qs: qs }
getListOfInstruments
-
getListOfInstruments(): Promise<string[]>
-
Returns Promise<string[]>
getOrderBookSnapshot
-
getOrderBookSnapshot(__namedParameters: { instrument: string }): Promise<IOrderBookSnapshot>
-
Parameters
-
__namedParameters:
{ instrument: string }
Private resolveURL
-
resolveURL(path: string): URL
Static fetch
-
fetch(url: string | URL, options?: RequestInit): Promise<unknown>
-
Parameters
-
url: string | URL
-
Default value
options:
RequestInit = {}
Returns Promise<unknown>
Static
setQuery
-
setQuery(url: URL, query: Record<string, string | number | boolean | undefined>): void
-
Parameters
-
url: URL
-
query: Record<string, string | number | boolean | undefined>
Returns void
Make a request and parse the body as JSON