JSON RPC API

Split API methods

Split RPC acts as a proxy for all Geth JSON RPC API requests to protocol nodes, enabling it to perform the full functionality of an ordinary node in networks such as ETH, BSC, Matic, etc.

Split API offers a range of benefits for various B2B categories, including Wallets, Node Providers, DEX, Trading Bots and DeFi Protocols:

  • Gasless transactions;

  • DEX aggregation & Cross-chain scaling;

  • MEV Protection on any EVM chain;

  • Additional revenue stream from arbitrage.

How it works: Users make swaps, we make a profit through atomic transaction backrunning and return it to you, you can keep the profit for yourself or share it with users.

SPLX custom methods

Request: splx_tx

This request initiates a transaction, specifying the transaction's partner, share, and signed transaction data.

shell
curl -X POST --data '{
  "jsonrpc": "2.0",
  "method": "splx_tx",
  "params": {
    "splxPartner": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "splxPartnerShare": 5, //up to 50%
    "signedTx": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  },
  "id": 1
}'

Response: This returns the transaction hash of the successful transaction.

json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
}

Request: splx_getOut

This request fetches the output of a transaction, detailing all the parameters involved in the trade including tokens, trader, volume, partner and more.

shell
curl -X POST --data '{
  "jsonrpc":"2.0",
  "method":"splx_getOut",
  "params":{
    "fromToken":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "toToken":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "destChainID":250, //optional
    "trader":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "volume":"60000000000000000000000",
    "partner":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", //optional
    "partnerShare":6,//optional up to 50%
    "slippage":0.03 //optional
  },
  "id":1
}'

Response: This returns the amount received from the transaction.

json
{
  "id":1,
  "jsonrpc": "2.0",
  "result": {"amountOut":"89348934"}
}

Request: splx_swap

This request is for performing a token swap operation.

shell
curl -X POST --data '{
  "jsonrpc":"2.0",
  "method":"splx_swap",
  "params":{
    "fromToken":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "toToken":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "destChainID":250, //optional
    "traderSig":"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b",
    "trader":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "volume":"60000000000000000000000",
    "partner":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", //optional
    "partnerShare":6, //optional up to 50%
    "slippage":0.03, //optional
    "burnAmount":10 //optional up to 100 SPLX tokens
  },
  "id":1
}'

Response: Returns the transaction hash of the performed swap operation.

json
{
  "id":1,
  "jsonrpc": "2.0",
  "result": {"txHash":"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"}
}

Request: splx_quote

This request retrieves a quote for a potential swap operation with given parameters.

shell
curl -X POST --data '{
  "jsonrpc":"2.0",
  "method":"splx_quote",
  "params":{
    "fromToken":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "toToken":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "destChainID":250, //optional
    "trader":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "volume":"60000000000000000000000",
    "partner":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", //optional
    "partnerShare":6, //optional up to 50%
    "slippage":0.03, //optional
    "burnAmount":10 //optional up to 100 SPLX tokens
  },
  "id":1
}'

Response: This returns the estimated transaction details of the swap.

json
{
  "id":1,
  "jsonrpc": "2.0",
  "result": {
    "tx":{
      "data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
      "to":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
      "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
      "value":"0x00",
      "gasPrice":"0x1dfd140000",
      "gasLimit":"0x1dfd",
      "chainId":250
    }
  }
}

Request: splx_setUserAuth

This request is to set the user's authentication status, detailing the trader's signature, trader's address, and ambassador's address.

shell
curl -X POST --data '{
  "jsonrpc":"2.0",
  "method":"splx_setUserAuth",
  "params":{
    "traderSig":"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b",
    "trader":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "ambassador":"0x407d73d8a49eeb85d32cf465507dd71d507100c1" //optional
  },
  "id":1
}'

Response: This confirms the successful setting of user authentication.

json
{
  "id":1,
  "jsonrpc": "2.0",
  "result": true
}

Request: splx_getRewardBalance

This request retrieves the user's reward balance across all chains if 'allChains' parameter is set to true.

shell
curl -X POST --data '{
  "jsonrpc":"2.0",
  "method":"splx_getRewardBalance",
  "params":{
    "user":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "allChains":true //optional
  },
  "id":1
}'

Response: This returns the reward balance of the user in each of the supported chains.

json
{
  "id":1,
  "jsonrpc": "2.0",
  "result": {
    "Arbitrum": {
      "Balance": "3058395460761",
      "ProtocolEarn": "0",
      "RefLvl1": "0",
      "RefLvl2": "0",
      "Total": "3058395460761",
      "VE": "3058395460761"
    },
    "Avalanche": {
      "Balance": "184358675222238",
      "ProtocolEarn": "0",
      "RefLvl1": "0",
      "RefLvl2": "0",
      "Total": "184358675222238",
      "VE": "184358675222238"
    },
    //... other chains here
  }
}

Request: splx_claimReward

This request is used to claim the user's accumulated rewards.

shell
curl -X POST --data '{
  "jsonrpc":"2.0",
  "method":"splx_claimReward",
  "params":{
    "traderSig":"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b",
    "trader":"0x407d73d8a49eeb85d32cf465507dd71d507100c1"
  },
  "id":1
}'

Response: This confirms the successful claiming of rewards and returns transaction hash for the claiming operation.

json
{
  "id":1,
  "jsonrpc": "2.0",
  "result": {
    "Polygon": "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  }
}

Split Networks

Network name: Split Ethereum

Network RPC URL: https://splitex.app/http/eth Chain ID: 1 Currency: ETH Block Explorer URL: https://etherscan.io/

Network name: Split BSC

Network RPC URL: https://splitex.app/http/bsc Chain ID: 56 Currency: BNB Block Explorer URL: https://www.bscscan.com/

Network name: Split Polygon

Network RPC URL: https://splitex.app/http/polygon Chain ID: 137 Currency: MATIC Block Explorer URL: https://polygonscan.com/

Network name: Split Arbitrum

Network RPC URL: https://splitex.app/http/arbitrum Chain ID: 42161 Currency: ETH Block Explorer URL: https://arbiscan.io/

Network name: Split Avalanche

Network RPC URL: https://splitex.app/http/avalanche Chain ID: 43114 Currency: AVAX Block Explorer URL: https://snowtrace.io/

Network name: Split Fantom

Network RPC URL: https://splitex.app/http/fantom Chain ID: 250 Currency: FTM Block Explorer URL: https://ftmscan.com/

Last updated