Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Products/Interfaces/Candle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ export interface Candle {
volume: number;
size: number;
tradesCounter: number;
closeTradeTimestamp: number;
openTradeTimestamp: number;
startedAtTimestamp: number;
exchange: string;
instrument: string;
isNew: boolean;
base: string;
quote: string;
}
3 changes: 1 addition & 2 deletions src/Products/Interfaces/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export interface Index {
weightedT: number;
diffPercent: number;
name: string;
diffPercentAbsolute: number;
tendency: string;
diff: number;
}
2 changes: 1 addition & 1 deletion src/Products/Interfaces/News.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface News {
groupId: string;
currency: string;
description: string;
sentiment: string;
title: string;
Expand Down
5 changes: 2 additions & 3 deletions src/Products/Interfaces/Orderbook.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export interface Orderbook {
producerId: string;
state: OrderBookState;
exchange: string;
market: string;
base: string;
quote: string;
snapshot?: null | OrderBookSnapshot;
patch?: null | OrderBookPatch;
}
Expand Down
6 changes: 0 additions & 6 deletions src/Products/Interfaces/Trade.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
export interface Trade {
data: TradeData;
base: string;
quote: string;
exchange: string;
}

interface TradeData {
id: string;
price: number;
amount: number;
datetime: string;
timestamp: number;
type?: null | TradeType;
side?: null | TradeDirection;
Expand Down
16 changes: 15 additions & 1 deletion src/Products/NewsProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@ import {Products} from "../Enums/Products";
import {BaseProduct} from "./BaseProduct";

export class NewsProduct extends BaseProduct {
public constructor() {

public get currency() {
return this.getProperty("currency");
}

public set currency(value: string) {
this.setProperty("currency", value);
}

public constructor(options: NewsProductOptions) {
super(Products.NEWS);
this.setProperty("currency", options.currency || "");
}
}

export interface NewsProductOptions {
currency?: string;
}
16 changes: 15 additions & 1 deletion src/Products/SentimentProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@ import {Products} from "../Enums/Products";
import {BaseProduct} from "./BaseProduct";

export class SentimentProduct extends BaseProduct {
public constructor() {

public get currency() {
return this.getProperty("currency");
}

public set currency(value: string) {
this.setProperty("currency", value);
}

public constructor(options: SentimentProductOptions) {
super(Products.SENTIMENTS);
this.setProperty("currency", options.currency || "");
}
}

export interface SentimentProductOptions {
currency?: string;
}