Skip to content

Commit

Permalink
Merge pull request #79 from hummingbot/staging
Browse files Browse the repository at this point in the history
sync gateway / staging -> master for Hummingbot gateway version 1.14.0
  • Loading branch information
nikspz committed Mar 30, 2023
2 parents c1e4fec + 74358b3 commit 5065ee8
Show file tree
Hide file tree
Showing 1,632 changed files with 153,912 additions and 19,597 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ jobs:
sed -i 's/https:\/\/rpc.ankr.com\/avalanche/http:\/\/127.0.0.1:8545\//g' ./conf/avalanche.yml
sed -i 's/https:\/\/rpc.ankr.com\/avalanche_fuji/http:\/\/127.0.0.1:8545\//g' ./conf/avalanche.yml
sed -i 's/https:\/\/rpc.ankr.com\/polygon_mumbai/http:\/\/127.0.0.1:8545\//g' ./conf/polygon.yml
sed -i 's/https:\/\/rpc.ankr.com\/harmony/http:\/\/127.0.0.1:8545\//g' ./conf/harmony.yml
sed -i 's/https:\/\/api.s0.b.hmny.io/http:\/\/127.0.0.1:8545\//g' ./conf/harmony.yml
sed -i 's/https:\/\/data-seed-prebsc-1-s1.binance.org:8545/http:\/\/127.0.0.1:8545\//g' ./conf/binance-smart-chain.yml
sed -i 's/https:\/\/rpc.ankr.com\/bsc/http:\/\/127.0.0.1:8545\//g' ./conf/binance-smart-chain.yml
sed -i 's/https:\/\/rpc.ankr.com\/bsc_testnet_chapel/http:\/\/127.0.0.1:8545\//g' ./conf/binance-smart-chain.yml
sed -i 's/https:\/\/cosmos-testnet-rpc.allthatnode.com:26657/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml
sed -i 's/https:\/\/cosmos-mainnet-rpc.allthatnode.com:26657/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml
sed -i 's/https:\/\/evm-t3.cronos.org/http:\/\/127.0.0.1:8545\//g' ./conf/cosmos.yml
Expand All @@ -96,5 +98,7 @@ jobs:
run: |
git fetch --all -q
git checkout -b $GITHUB_SHA
yarn test:cov
DIFF_FILES=`git diff --name-only origin/$GITHUB_BASE_REF ./src/`
./node_modules/.bin/jest --listTests --findRelatedTests ${DIFF_FILES//$'\n'/ }
NODE_OPTIONS=--max-old-space-size=10240 node ./node_modules/.bin/jest --runInBand --coverage --findRelatedTests ${DIFF_FILES//$'\n'/ }
# git diff origin/$GITHUB_BASE_REF | yarn diff-test-coverage -c ./coverage/lcov.info -t lcov -b 50 -l 60
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
/.idea
package-lock.json
/certs
/coverage
/node_modules
/coverage
**/.DS_Store
**/gateway_files
**/gateway_files

# VSCode
.vscode/
.history
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ certs
*.md
*.yml
coverage
dist
dist
vendor
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN ln -s /conf /usr/src/app/conf && \
RUN mkdir -p /var/lib/gateway /certs /conf /logs /usr/src/app/gateway.level /usr/src/app/transactions.level \
/usr/src/app/db
RUN chown -R hummingbot:hummingbot /var/lib/gateway /usr/src/app/logs /usr/src/app/conf /usr/src/app/certs \
/usr/src/app/gateway.level /usr/src/app/transactions.level /usr/src/app/db
/usr/src/app/gateway.level /usr/src/app/transactions.level /usr/src/app/db /usr/src/app/conf/

# install dependencies
RUN yarn install --frozen-lockfile
Expand Down
196 changes: 196 additions & 0 deletions docs/swagger/clob-routes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
paths:
/clob/markets:
get:
tags:
- 'clob'
summary: 'Get the markets for a clob'
operationId: 'markets'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobMarketsRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobMarketResponse'
'404':
description: 'Not found response.'
/clob/orderBook:
get:
tags:
- 'clob'
summary: 'Gets orderbook for a market'
operationId: 'orderBook'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobOrderbookRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobOrderbookResponse'
'404':
description: 'Not found response.'
/clob/ticker:
get:
tags:
- 'clob'
summary: 'Get One or More Tickers'
description: 'Get the information of one, several or all available tickers.'
operationId: 'tickers'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobTickerRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobTickerResponse'
'404':
description: 'Not found response.'
/clob/orders:
post:
tags:
- 'clob'
summary: 'Create One Or More Orders'
description: 'Create one or more orders.'
operationId: 'postOrders'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobPostOrderRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobPostOrderResponse'
'400':
description: 'Bad request response.'
get:
tags:
- 'clob'
summary: 'Get One Or More Orders'
description: 'Get the information of one, several or all orders.'
operationId: 'orders'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobGetOrderRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobGetOrderResponse'
'400':
description: 'Bad request response.'
'404':
description: 'Not found response.'
delete:
tags:
- 'clob'
summary: 'Cancel One Or More Orders Open Orders'
description: 'Cancel one, several or all open orders.'
operationId: 'deleteOrders'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobDeleteOrderRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobDeleteOrderResponse'
'400':
description: 'Bad request response.'
'404':
description: 'Not found response.'
/clob/batchOrders:
post:
tags:
- 'clob'
summary: 'Batch create or delete orders'
description: 'Create or delete orders in batch.'
operationId: 'batchOrders'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
description: 'Request body.'
required: true
schema:
$ref: '#/definitions/ClobBatchOrdersRequest'
responses:
'200':
description: 'Successful response.'
schema:
$ref: '#/definitions/ClobBatchOrdersResponse'
'400':
description: 'Bad request response.'
/clob/estimateGas:
post:
tags:
- 'clob'
summary: 'Estimate the total gas costs for sending an clob order'
operationId: 'estimateGas'
consumes:
- 'application/json'
produces:
- 'application/json'
parameters:
- in: 'body'
name: 'body'
required: true
schema:
$ref: '#/definitions/NetworkSelectionRequest'
responses:
'200':
schema:
$ref: '#/definitions/EstimateGasResponse'
Loading

0 comments on commit 5065ee8

Please sign in to comment.