Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@glue42/acme-mock-data-service
Advanced tools
A data service for generating and storing mocked market data.
To build use the scripts below:
npm install
npm run build
Output bundles are available in format for usage.
"data-service": "dist/data-service-${projectVersion}.js",
"data-service-map": "dist/data-service-${projectVersion}.js.map"
"index.html": "dist/index.html",
Take the data-service js file and reference it in your Glue initialization file. Add plugin property to your glue config
webPlatform: {
config: {
plugins: {
definitions: [
{
name: 'data-service',
critical: true,
start: (glue) => {
async function main() {
await MockDataGenerator(glue)
}
}
main()
},
},
]
}
}
}
Generates a list of bids for instrument.
Property | Type | Description | Required |
---|---|---|---|
ticker | string | Instrument ticker | Yes |
lastPrice | number | Price based on which the prices for the bids will be generated | Yes |
Returns
Property | Type |
---|---|
bids | BidData[] |
Example
{
bids: [
{
count: 5,
volume: 7900,
price: 2770.99,
side: '1',
},
{
count: 4,
volume: 10500,
price: 3192.67,
side: '2',
},
]
}
Stream market generated data for the specific instrument list. Subscribe for each symbol in the list.
Accepts
Property | Type | Description | Required |
---|---|---|---|
instrumentList | Fdc3InstrumentList | List with fdc3 instruments | Yes |
Returns
Property | Type | Description |
---|---|---|
ticker | string | Instrument ticker |
lastTradedVolume | number | Last traded volume |
lastPrice | number | Last traded price |
openPrice | number | Open price |
lowPrice | number | Lowest traded price for the day |
highPrice | number | Highest traded price for the day |
prevClosePrice | number | Close price for yesterday |
totalVWAP | number | Volume-weighted average price |
time | Date | Time of generating the data |
description | String | Description name |
isin | string | International Securities Identification Number |
currency | string | Currency of the |
Example
{
data:
{
ticker: "BARC",
volume: 36564354,
lastTradedVolume: 10000,
lastPrice: 212.901,
openPrice: 237.003,
lowPrice: 241.01999999999998,
highPrice: 241.01999999999998,
prevClosePrice: 160.68,
totalVWAP: 236.60129999999998,
time: "2022-02-18T15:18:18.368Z",
description: "Barclays Plc",
isin: "GB0031348658",
currency: "GBX"
}
}
Stores custom orders and trades, created by T42.OMS.CreateOrder and T42.OMS.CreateTrade. Generate orders, trades and slices. Once an order is generated slices are generated for the order until it's filled.
Accepts
Property | Type | Description | Required |
---|---|---|---|
date | Date | End period of the generated orders. Start period is 00.00.00 the same day | Yes |
withSlices | boolean | Include the corresponding slices for the orders | No |
withTrades | boolean | Include the corresponding trades for the orders | No |
Returns
Property | Type |
---|---|
orders | OrderInfo [] |
slices | OrderSlice [] |
trades | OrderTrade [] |
Example
{
orders: [
{
orderId: 46342144,
clientId: 'TEST2',
instrument: 'ITV:LN',
currency: 'GBX',
side: '1',
quantity: 840,
quantityFilled: 840,
dateCreated: '2022-02-18T07:02:28.000Z',
orderType: '1',
timeInForce: '0',
limitPrice: 0,
comments: '',
averagePrice: 114.65121428571427,
tradeStatus: 'Done',
brokerId: 'XX',
bookId: 'AGENCY',
split: [
{
brokerIndex: 1,
quantity: 840,
},
],
},
],
trades: [
[
{
orderId: 46342144,
clientId: "TEST2",
sliceId: 4634214401,
side: "1",
instrument: "ITV:LN",
currency: "GBX",
timestamp: "2022-02-18T07:02:47.000Z",
quantity: 480,
price: 116.6715,
execBroker: "BROKER2",
exchange: "XOFF",
comments: "",
bookId: "AGENCY"
},
{
orderId: 46342144,
clientId: "TEST2",
sliceId: 4634214401,
side: "1",
instrument: "ITV:LN",
currency: "GBX",
timestamp: "2022-02-18T07:03:12.000Z",
quantity: 360,
price: 111.9575,
execBroker: "BROKER2",
exchange: "XOFF",
comments: "",
bookId: "AGENCY"
}
],
],
slices: [
[
{
orderId: 46342144,
clientId: "TEST2",
instrument: "ITV:LN",
currency: "GBX",
side: "1",
quantity: 840,
quantityFilled: 840,
dateCreated: "2022-02-18T07:02:28.000Z",
orderType: "1",
timeInForce: "0",
limitPrice: 0,
comments: "",
averagePrice: 114.65121428571427,
tradeStatus: "Done",
brokerId: "BROKER2",
bookId: "AGENCY",
split: [
{
brokerIndex: 1,
quantity: 840
}
],
sliceId: 4634214401,
brokerExchange: "XOFF"
}
]
]
}
Returns single order with it's corresponding slices and trades if passed in the arguments.
Accepts
Property | Type | Description | Required |
---|---|---|---|
orderId | String | Id of the requested order | Yes |
date | Date | End period of the generated orders of which the order will be filtered from. Start period is 00.00.00 the same day | Yes |
withSlices | boolean | Include the corresponding slices for the orders | No |
withTrades | boolean | Include the corresponding trades for the orders | No |
Returns
Property | Type |
---|---|
order | OrderInfo |
slices | OrderSlice [] |
trades | OrderTrade [] |
Example
{
order: {
dateCreated: "2022-02-18T07:05:31.000Z",
side: "2",
currency: "GBX",
limitPrice: 0,
quantityFilled: 1920,
tradeStatus: "Done",
quantity: 1920,
brokerId: "XX",
split: [
{
"brokerIndex": 1,
"quantity": 1920
}
],
instrument: "BATS:LN",
clientId: "TEST1",
bookId: "AGENCY",
averagePrice: 2600.359375,
comments: "",
orderId: 46342146,
timeInForce: "0",
orderType: "1"
},
slices: [
{
dateCreated: "2022-02-18T07:05:31.000Z",
brokerExchange: "XOFF",
side: "2",
currency: "GBX",
limitPrice: 0,
quantityFilled: 1920,
tradeStatus: "Done",
quantity: 1920,
brokerId: "BROKER2",
split: [
{
brokerIndex: 1,
quantity: 1920
}
],
instrument: "BATS:LN",
clientId: "TEST1",
bookId: "AGENCY",
averagePrice: 2600.359375,
comments: "",
orderId: 46342146,
sliceId: 4634214601,
timeInForce: "0",
orderType: "1"
}
]
}
Return all daily trades as of date/time
Accepts
Property | Type | Description | Required |
---|---|---|---|
date | Date | End period of the trades. Start period is 00.00.00 the same day | Yes |
Returns
Property | Type |
---|---|
trades | OrderTrade [] |
Example
{
trades: [
{
orderId: 46342144,
clientId: 'TEST2',
sliceId: 4634214401,
side: '1',
instrument: 'ITV:LN',
currency: 'GBX',
timestamp: '2022-02-18T07:02:47.000Z',
quantity: 480,
price: 116.6715,
execBroker: 'BROKER2',
exchange: 'XOFF',
comments: '',
bookId: 'AGENCY',
},
]
}
Returns orderId corresponding to the provided sliceId
Accepts
Property | Type | Description | Required |
---|---|---|---|
sliceId | String | sliceId of the required order | Yes |
Returns
Property | Type |
---|---|
orderId | String |
Returns trading positions as of date/time for trades grouped by book and after that instruments
Accepts
Property | Type | Description | Required |
---|---|---|---|
date | Date | End period of the generated orders of which the order will be filtered from. Start period is 00.00.00 the same day | Yes |
Returns
Property | Type |
---|---|
tradingPositions | TradePosition |
Example
{
tradingPositions: {
"AGENCY": {
"ITV:LN": {
book: "AGENCY",
instrument: "ITV:LN",
position: -1680,
averagePrice: 119.87719589552236,
totalVolume: 8040,
totalPrice: 963812.6549999998,
currency: "GBX"
},
"BATS:LN": {
book: "AGENCY",
instrument: "BATS:LN",
position: -2972,
averagePrice: 2474.029309596179,
totalVolume: 9212,
totalPrice: 22790758,
currency: "GBX"
}
},
"RISK": {
"HSBA:LN": {
book: "RISK",
instrument: "HSBA:LN",
position: 1260,
averagePrice: 502.15,
totalVolume: 7740,
totalPrice: 3886641,
currency: "GBX"
},
"BATS:LN": {
book: "RISK",
instrument: "BATS:LN",
position: -3660,
averagePrice: 2545.767027559055,
totalVolume: 7620,
totalPrice: 19398744.75,
currency: "GBX"
},
}
}
}
Accepts
Property | Type | Description | Required |
---|---|---|---|
order | OrderInfo | Order which will be part of the custom orders | Yes |
Example
{
order: {
dateCreated: "2022-02-18T14:03:41.416Z",
side: "2",
currency: "GBX",
limitPrice: 123,
quantityFilled: 0,
tradeStatus: "",
expireTime: "2022-02-16T22:00:00.000Z",
quantity: 123,
brokerId: "",
instrument: "BATS:LN",
clientId: "client@outlook.com",
averagePrice: 0,
comments: "Instructions",
orderId: 0,
timeInForce: "6",
orderType: "3"
}
}
Accepts
Property | Type | Description | Required |
---|---|---|---|
trade | OrderTrade | Trade which will be part of the custom orders | Yes |
Example
{
trade: {
side: "2",
currency: "GBX",
timestamp: "2022-02-18T09:59:00.000Z",
quantity: 332,
instrument: "BATS:LN",
clientId: "TEST1",
bookId: "AGENCY",
comments: "Instructions",
execBroker: "BROKER2",
exchange: "XOFF",
orderId: 46342146,
sliceId: 4634214601,
price: 123
}
}
Returns
Property | Type |
---|---|
brokers | BrokerInfo[] |
Example
{
brokers: [
{
brokerId: 'BROKER1',
brokerExchange: 'XOFF',
},
{
brokerId: 'BROKER2',
brokerExchange: 'XOFF',
},
]
}
Retrieve a list of supported instruments
Returns
Property | Type |
---|---|
instruments | InstrumentInfo[] |
Example
{
instruments: {
ticker: 'AZN',
bbgExchange: 'LN',
isin: 'GB0009895292',
description: 'AstraZeneca Plc',
currency: 'GBX',
price: {
close: 9138.0,
yearLow: 6499.8,
yearHigh: 9258.4,
},
volume: {
average: 2120914,
},
}
}
Returns a list of supported instruments with Fdc3InstrumentList
Returns
Property | Type |
---|---|
instruments | Fdc3InstrumentList[] |
Example
{
instruments: {
type: 'fdc3.instrumentList',
instruments: [{
type: 'fdc3.instrument',
name: 'AstraZeneca Plc',
id: { ticker: 'AZN' },
}]
}
}
Returns a list of clients
Returns
Property | Type |
---|---|
clients | FDC3.ContactList |
Example
{
clients: [
{
type: 'fdc3.contact',
name: 'TEST1',
id: {
email: 'test1.demo@tick42.com',
salesforceId: '0030900000aBhKYAA0',
clientId: 'TEST1',
},
},
]
}
Returns
Property | Type |
---|---|
orderValidity | [value]: {displayName: string, shortName: string, enabled: boolean} |
Example
{
orderValidity: {
'0': {
displayName: 'Day',
shortName: 'DAY',
enabled: true,
},
'1': {
displayName: 'Good Till Cancel',
shortName: 'GTC',
enabled: true,
},
}
}
Returns
Property | Type |
---|---|
orderTypes | [value]: {displayName: string, enabled: boolean} |
Example
{
orderTypes: {
'1': {
displayName: 'Market',
enabled: true,
},
'2': {
displayName: 'Limit',
enabled: true,
},
}
}
Returns
Property | Type |
---|---|
orderSides | [value]: {displayName: string, shortName: string, enabled: boolean} |
{
orderSides: {
'1': {
displayName: 'Buy',
shortName: 'B',
enabled: true,
},
'2': {
displayName: 'Sell',
shortName: 'S',
enabled: true,
}
}
}
Returns
Property | Type |
---|---|
funds | FundInfo [] |
{
funds: [
{
name: 'GAM Star Disruptive Growth Inst Acc GBP',
isin: 'IE00B5VMHR51',
url: 'https://www.morningstar.co.uk/uk/funds/snapshot/snapshot.aspx?id=F00000Q28W',
instruments: [
{
ticker: 'MSFT',
bbgExchange: 'US',
url: 'https://tools.morningstar.co.uk/uk/stockreport/default.aspx?Site=uk&id=0P000003MH',
portfolioPercent: 7.7,
currency: 'USD',
isin: 'US5949181045',
quantity: 7700000,
volume: {
average: 33954187,
},
price: {
close: 301.25,
yearLow: 224.26,
yearHigh: 349.67,
},
description: 'Microsoft',
},
],
},
]
}
FAQs
Glue42 Core ACME mocked data service
The npm package @glue42/acme-mock-data-service receives a total of 8 weekly downloads. As such, @glue42/acme-mock-data-service popularity was classified as not popular.
We found that @glue42/acme-mock-data-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.