Skip to content

Instantly share code, notes, and snippets.

@MohamedLamineAllal
Created November 28, 2020 20:32
Show Gist options
  • Save MohamedLamineAllal/022f6f285313aec30b82bb72238bcaeb to your computer and use it in GitHub Desktop.
Save MohamedLamineAllal/022f6f285313aec30b82bb72238bcaeb to your computer and use it in GitHub Desktop.
Second execution after adding the assignment line at the end (go to the bottom)
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
/**
text:
text:
text:
*
text:
text:
text:
*
text:
text:
text:
* @param {*} symbols : string or array
text:
text:
text:
* @param {*} callback
text:
text:
text:
* @memberof WSExchangeApi
text:
text:
text:
*/
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
trades
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
symbols
text:
:
text:
text:
string
text:
text:
|
text:
text:
string
text:
[
text:
]
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
trade
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Trade
text:
)
text:
text:
=>
text:
text:
void
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
/**
text:
text:
text:
*
text:
text:
text:
*
text:
text:
text:
* @param {*} symbols : string or array
text:
text:
text:
* @param {*} callback
text:
text:
text:
* @memberof WSExchangeApi
text:
text:
text:
*/
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
aggTrades
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
symbols
text:
:
text:
text:
string
text:
text:
|
text:
text:
string
text:
[
text:
]
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
trade
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
AggregatedTrade
text:
)
text:
text:
=>
text:
text:
void
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
liquidationOrder
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
symbol
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
string_symbol
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
data
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
WsLiquidationOrder
text:
)
text:
text:
=>
text:
text:
void
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
user
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
trade
text:
:
text:
text:
object
text:
)
text:
text:
=>
text:
text:
void
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
balanceUpdate
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
data
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWSBalanceUpdateData
text:
)
text:
text:
=>
text:
text:
void
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
options
text:
?
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWsBalanceUpdateDataOptions
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
marginTypeChangeUpdate
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
data
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWSChangeMarginTypeData
text:
)
text:
text:
=>
text:
text:
void
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
options
text:
?
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWsMarginUpdateDataOptions
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
/**
text:
text:
text:
* get the orders updates for the user
text:
text:
text:
* (it's on all symbols)
text:
text:
text:
* @abstract
text:
text:
text:
* @param {(data: IWSOrderUpdateData) => void} callback
text:
text:
text:
* @memberof WSExchangeAPI
text:
text:
text:
*/
text:
abstract
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ordersUpdate
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
callback
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
data
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWSOrderUpdateData
text:
)
text:
text:
=>
text:
text:
void
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
options
text:
?
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWsOrderUpdateDataOptions
text:
)
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Promise
text:
<
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IStreamReturnObj
text:
>
text:
;
text:
}
text:
/**
text:
text:
text:
* A driver for a WebSocket like api implementation
text:
text:
text:
*
text:
text:
text:
* The Point: Access to the change events! Which can be needed to manipulate streams interruptions and reconnection
text:
text:
text:
*
text:
text:
text:
* note onInit => used to init internal variables
text:
text:
text:
* and setGetStreamObj => to set the function that allow us to get the stream object
text:
text:
text:
*
text:
text:
text:
* @export
text:
text:
text:
* @interface IWebSocketDriver
text:
text:
text:
*/
text:
export
text:
text:
interface
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
text:
{
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
protocol
text:
:
text:
text:
string
text:
;
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
readyState
text:
:
text:
text:
number
text:
;
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
url
text:
:
text:
text:
string
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
binaryType
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
BinaryType
text:
;
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
CONNECTING
text:
:
text:
text:
number
text:
;
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
OPEN
text:
:
text:
text:
number
text:
;
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
CLOSING
text:
:
text:
text:
number
text:
;
text:
readonly
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
CLOSED
text:
:
text:
text:
number
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
setGetStreamObj
text:
:
text:
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
getStreamObj
text:
:
text:
text:
(
text:
)
text:
text:
=>
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
WebSocket
text:
text:
|
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
)
text:
text:
=>
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
onInit
text:
:
text:
text:
(
text:
)
text:
text:
=>
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
onopen
text:
:
text:
text:
(
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
this
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ev
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Event
text:
)
text:
text:
=>
text:
text:
any
text:
)
text:
text:
|
text:
text:
null
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
onmessage
text:
:
text:
text:
(
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
this
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ev
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
MessageEvent
text:
)
text:
text:
=>
text:
text:
any
text:
)
text:
text:
|
text:
text:
null
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
onclose
text:
:
text:
text:
(
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
this
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ev
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
CloseEvent
text:
)
text:
text:
=>
text:
text:
any
text:
)
text:
text:
|
text:
text:
null
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
onerror
text:
:
text:
text:
(
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
this
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
IWebSocketDriver
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ev
text:
:
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Event
text:
)
text:
text:
=>
text:
text:
any
text:
)
text:
text:
|
text:
text:
null
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
close
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
code
text:
?
text:
:
text:
text:
number
text:
,
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
reason
text:
?
text:
:
text:
text:
string
text:
)
text:
:
text:
text:
void
text:
;
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
send
text:
(
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
data
text:
:
text:
text:
string
text:
text:
|
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ArrayBufferLike
text:
text:
|
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
Blob
text:
text:
|
text:
Source file:
/home/coderhero/Documents/coderhero/Dev/projects/glitnir/TradingPlatformProject/ExchangeAPI/src/interface.ts
================+++>
text:
ArrayBufferView
text:
)
text:
:
text:
text:
void
text:
;
text:
}
text:
undefined
/home/coderhero/.nvm/versions/node/v15.0.1/lib/node_modules/typescript/lib/tsc.js:87006
throw e;
^
TypeError: Cannot read property 'length' of undefined
at computeLineStarts (/home/coderhero/.nvm/versions/node/v15.0.1/lib/node_modules/typescript/lib/tsc.js:6528:27)
at Object.getLineStarts (/home/coderhero/.nvm/versions/node/v15.0.1/lib/node_modules/typescript/lib/tsc.js:6581:60)
at getCurrentLineMap (/home/coderhero/.nvm/versions/node/v15.0.1/lib/node_modules/typescript/lib/tsc.js:81810:59)
at emitDetachedCommentsAndUpdateCommentsInfo (/home/coderhero/.nvm/versions/node/v15.0.1/lib/node_modules/typescript/lib/tsc.js:85144:94)
at emitBodyWithDetachedComments (/home/coderhero/.nvm/versions/node/v15.0.1/lib/node_modules/typescript/lib/tsc.js:85007:17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment