Search
Preparing search index...
The search index is not available
SwapRate JS SDK
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"Api/index"
Api
Class Api
SwapRate HTTP and Socket.io API
Hierarchy
Api
Index
Constructors
constructor
Properties
_access
Token
_endpoint
_options
_socket
Accessors
access
Token
Methods
_parse
Access
Token
_valid
Access
Token
_validTTL
close
Socket
get
Auth
Login
Data
get
Fixed
Rate
Deposit
Quote
get
Meta
Config
get
Products
get
Wallet
Balance
off
Charts
off
Error
off
Error
Message
off
Orders
off
Positions
off
Swaps
on
Charts
on
Error
on
Error
Message
on
Orders
on
Positions
on
Swaps
post
Order
Form
post
Order
Sign
put
Orders
Cancel
subscribe
Charts
subscribe
Orders
subscribe
Positions
subscribe
Swaps
unsubscribe
Charts
unsubscribe
Orders
unsubscribe
Positions
unsubscribe
Swaps
Constructors
constructor
new
Api
(
options
?:
ApiOptionsArguments
)
:
Api
Parameters
Optional
options:
ApiOptionsArguments
Returns
Api
Properties
Private
_access
Token
_access
Token
:
string
|
null
= null
Private
_endpoint
_endpoint
:
string
Private
_options
_options
:
ApiOptions
Private
_socket
_socket
:
SocketClient
Accessors
access
Token
set
accessToken
(
accessToken
:
string
)
:
void
Parameters
accessToken:
string
Returns
void
Methods
Private
_parse
Access
Token
_parse
Access
Token
(
accessToken
:
string
)
:
AccessToken
Parameters
accessToken:
string
Returns
AccessToken
Private
_valid
Access
Token
_valid
Access
Token
(
accessToken
:
string
|
null
)
:
string
Parameters
accessToken:
string
|
null
Returns
string
Private
_validTTL
_validTTL
(
accessToken
:
string
)
:
boolean
Parameters
accessToken:
string
Returns
boolean
close
Socket
close
Socket
(
)
:
void
Returns
void
get
Auth
Login
Data
get
Auth
Login
Data
(
)
:
Promise
<
AuthLoginDataResponse
>
Returns
Promise
<
AuthLoginDataResponse
>
get
Fixed
Rate
Deposit
Quote
get
Fixed
Rate
Deposit
Quote
(
productId
:
string
, maturity
:
number
, nominal
:
number
)
:
Promise
<
ProductQuoteResponse
>
Parameters
productId:
string
maturity:
number
nominal:
number
Returns
Promise
<
ProductQuoteResponse
>
get
Meta
Config
get
Meta
Config
(
)
:
Promise
<
MetaConfigResponse
>
Returns
Promise
<
MetaConfigResponse
>
get
Products
get
Products
(
)
:
Promise
<
ProductsResponse
>
Returns
Promise
<
ProductsResponse
>
get
Wallet
Balance
get
Wallet
Balance
(
accessToken
?:
null
|
string
)
:
Promise
<
WalletBalanceResponse
>
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
Promise
<
WalletBalanceResponse
>
off
Charts
off
Charts
(
fn
:
(
response
:
socket.DataChannelResponse
<
Charts
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Charts
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Charts
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Charts
>
Returns
unknown
Returns
void
off
Error
off
Error
(
fn
:
Function
)
:
void
Parameters
fn:
Function
Returns
void
off
Error
Message
off
Error
Message
(
fn
:
(
response
:
socket.ErrorChannelResponse
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.ErrorChannelResponse
)
=>
unknown
(
response
:
socket.ErrorChannelResponse
)
:
unknown
Parameters
response:
socket.ErrorChannelResponse
Returns
unknown
Returns
void
off
Orders
off
Orders
(
fn
:
(
response
:
socket.DataChannelResponse
<
Order
[]
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Order
[]
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Order
[]
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Order
[]
>
Returns
unknown
Returns
void
off
Positions
off
Positions
(
fn
:
(
response
:
socket.DataChannelResponse
<
Position
[]
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Position
[]
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Position
[]
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Position
[]
>
Returns
unknown
Returns
void
off
Swaps
off
Swaps
(
fn
:
(
response
:
socket.DataChannelResponse
<
Swap
[]
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Swap
[]
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Swap
[]
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Swap
[]
>
Returns
unknown
Returns
void
on
Charts
on
Charts
(
fn
:
(
response
:
socket.DataChannelResponse
<
Charts
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Charts
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Charts
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Charts
>
Returns
unknown
Returns
void
on
Error
on
Error
(
fn
:
Function
)
:
void
Parameters
fn:
Function
Returns
void
on
Error
Message
on
Error
Message
(
fn
:
(
response
:
socket.ErrorChannelResponse
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.ErrorChannelResponse
)
=>
unknown
(
response
:
socket.ErrorChannelResponse
)
:
unknown
Parameters
response:
socket.ErrorChannelResponse
Returns
unknown
Returns
void
on
Orders
on
Orders
(
fn
:
(
response
:
socket.DataChannelResponse
<
Order
[]
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Order
[]
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Order
[]
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Order
[]
>
Returns
unknown
Returns
void
on
Positions
on
Positions
(
fn
:
(
response
:
socket.DataChannelResponse
<
Position
[]
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Position
[]
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Position
[]
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Position
[]
>
Returns
unknown
Returns
void
on
Swaps
on
Swaps
(
fn
:
(
response
:
socket.DataChannelResponse
<
Swap
[]
>
)
=>
unknown
)
:
void
Parameters
fn:
(
response
:
socket.DataChannelResponse
<
Swap
[]
>
)
=>
unknown
(
response
:
socket.DataChannelResponse
<
Swap
[]
>
)
:
unknown
Parameters
response:
socket.DataChannelResponse
<
Swap
[]
>
Returns
unknown
Returns
void
post
Order
Form
post
Order
Form
(
order
:
PostOrdersFormRequestBody
, accessToken
?:
null
|
string
)
:
Promise
<
PostOrdersFormResponse
>
Parameters
order:
PostOrdersFormRequestBody
Default value
accessToken:
null
|
string
= this._accessToken
Returns
Promise
<
PostOrdersFormResponse
>
post
Order
Sign
post
Order
Sign
(
order
:
PostOrdersSignRequestBody
, accessToken
?:
null
|
string
)
:
Promise
<
PostOrdersSignResponse
>
Parameters
order:
PostOrdersSignRequestBody
Default value
accessToken:
null
|
string
= this._accessToken
Returns
Promise
<
PostOrdersSignResponse
>
put
Orders
Cancel
put
Orders
Cancel
(
orderIds
:
string
[]
, accessToken
?:
null
|
string
)
:
Promise
<
void
>
Parameters
orderIds:
string
[]
Default value
accessToken:
null
|
string
= this._accessToken
Returns
Promise
<
void
>
subscribe
Charts
subscribe
Charts
(
productId
:
string
)
:
void
Parameters
productId:
string
Returns
void
subscribe
Orders
subscribe
Orders
(
accessToken
?:
null
|
string
)
:
void
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
void
subscribe
Positions
subscribe
Positions
(
accessToken
?:
null
|
string
)
:
void
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
void
subscribe
Swaps
subscribe
Swaps
(
accessToken
?:
null
|
string
)
:
void
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
void
unsubscribe
Charts
unsubscribe
Charts
(
productId
:
string
)
:
void
Parameters
productId:
string
Returns
void
unsubscribe
Orders
unsubscribe
Orders
(
accessToken
?:
null
|
string
)
:
void
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
void
unsubscribe
Positions
unsubscribe
Positions
(
accessToken
?:
null
|
string
)
:
void
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
void
unsubscribe
Swaps
unsubscribe
Swaps
(
accessToken
?:
null
|
string
)
:
void
Parameters
Default value
accessToken:
null
|
string
= this._accessToken
Returns
void
Globals
Externals
"
Api/index"
"
Api/requests"
"
Api/socket"
"
Utils/access
Token"
"
Utils/signature"
"
Utils/types"
"config"
Api
Error
Api
constructor
_access
Token
_endpoint
_options
_socket
access
Token
_parse
Access
Token
_valid
Access
Token
_validTTL
close
Socket
get
Auth
Login
Data
get
Fixed
Rate
Deposit
Quote
get
Meta
Config
get
Products
get
Wallet
Balance
off
Charts
off
Error
off
Error
Message
off
Orders
off
Positions
off
Swaps
on
Charts
on
Error
on
Error
Message
on
Orders
on
Positions
on
Swaps
post
Order
Form
post
Order
Sign
put
Orders
Cancel
subscribe
Charts
subscribe
Orders
subscribe
Positions
subscribe
Swaps
unsubscribe
Charts
unsubscribe
Orders
unsubscribe
Positions
unsubscribe
Swaps
Api
Options
Api
Options
Arguments
Generated using
TypeDoc
SwapRate HTTP and Socket.io API