{
  "name": "Automate cryptocurrency funding fee tracking with Binance API and Airtable",
  "nodes": [
    {
      "id": "a3ff8cdd-1dc7-4e0a-96af-ab07ee318ddb",
      "name": "Crypto2",
      "type": "n8n-nodes-base.crypto",
      "position": [
        940,
        -60
      ]
    },
    {
      "id": "860de117-0305-4c73-917b-f62be016ea4c",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        760,
        -60
      ]
    },
    {
      "id": "dd682d40-aa6a-4177-8c2a-2f7075e2a43e",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        1820,
        -60
      ]
    },
    {
      "id": "4c6d65ae-1174-495e-8052-f4b998ee001d",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2020,
        -60
      ]
    },
    {
      "id": "a5dd73dc-18fe-400b-beaf-21a83211899f",
      "name": "Get Positions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        -60
      ]
    },
    {
      "id": "491841fe-c173-4644-bf02-d43425f3b10e",
      "name": "Aggregate Positions",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1320,
        -60
      ]
    },
    {
      "id": "90a1818d-a933-4770-997d-2a0692141192",
      "name": "Aggregate Fees",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        580,
        -60
      ]
    },
    {
      "id": "39ee87a4-18eb-43f4-8489-ae16797492d6",
      "name": "Get Tokens",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1480,
        -60
      ]
    },
    {
      "id": "368b3bac-d0c1-435f-af34-377a893ba0b5",
      "name": "Aggregate Tokens",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1660,
        -60
      ]
    },
    {
      "id": "e2af8b4d-901f-4115-8704-55ba26e32a3c",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -180,
        -60
      ]
    },
    {
      "id": "0795a6bc-1c4a-4a42-a446-8a4b57e8d7d9",
      "name": "Crypto",
      "type": "n8n-nodes-base.crypto",
      "position": [
        40,
        -440
      ]
    },
    {
      "id": "006b141f-f27f-4099-ba9f-78f6d02a74c6",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -200,
        440
      ]
    },
    {
      "id": "721dfce3-d076-415d-b69c-982e633e4f86",
      "name": "Get Tokens1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        0,
        440
      ]
    },
    {
      "id": "edfc1dd2-4ce3-4b42-8abc-6bfe50fc38ec",
      "name": "Update Token Prices1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        460,
        420
      ]
    },
    {
      "id": "4f1d25cc-b79c-407e-a62c-92e4019ef974",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        300
      ],
      "parameters": {
        "width": 1000,
        "height": 340,
        "content": "### Scenario 2 - update tokens price"
      }
    },
    {
      "id": "ba0bc917-c61f-42cd-ac53-1c9028554910",
      "name": "Get Price",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        220,
        440
      ]
    },
    {
      "id": "0dbf2475-0012-4c4c-9b33-900ae3ab8285",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        -200
      ],
      "parameters": {
        "width": 3080,
        "height": 420,
        "content": "### Scenario 1 - Add funding fees"
      }
    },
    {
      "id": "28415862-ff31-4b23-83ab-3af1f35b4435",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2200,
        -60
      ]
    },
    {
      "id": "a54f5d41-d240-49dd-8827-8cbe125ec828",
      "name": "Create Token",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2380,
        40
      ]
    },
    {
      "id": "4f4e1eb4-23ea-4f98-8b31-2b2136da15dc",
      "name": "Create Statement",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2440,
        -120
      ]
    },
    {
      "id": "ea7f6c61-065f-41a0-87e5-46575612c815",
      "name": "Create Statement1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2560,
        40
      ]
    },
    {
      "id": "c63b2d49-8421-41d4-94d3-331775d15436",
      "name": "Crypto3",
      "type": "n8n-nodes-base.crypto",
      "position": [
        220,
        -60
      ]
    },
    {
      "id": "501feb0f-231e-4ac6-872e-3b07861a4b45",
      "name": "Edit Fields4",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        -60
      ]
    },
    {
      "id": "eb371433-5c67-4be2-bf61-c819c085afcf",
      "name": "Get Fees2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        -60
      ]
    },
    {
      "id": "833d6652-4d44-4a39-8e72-e3fa9a7b5cc8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -180
      ],
      "parameters": {
        "width": 200,
        "height": 80,
        "content": "### Replace Header Auth\nX-MBX-APIKEY=<your_api_key>"
      }
    },
    {
      "id": "989a1208-2457-4a85-a409-f00442b629a2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        120
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace Secret"
      }
    },
    {
      "id": "3c187a46-0760-400a-affa-2e3f1f9499e3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        120
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace Secret"
      }
    },
    {
      "id": "626481c1-f4a4-44ca-a7f0-32da29dfc0c9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -180
      ],
      "parameters": {
        "width": 200,
        "height": 80,
        "content": "### Replace Header Auth\nX-MBX-APIKEY=<your_api_key>"
      }
    },
    {
      "id": "a1c7b2df-c5bd-493a-b63e-6ecad817c7cd",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        -560
      ],
      "parameters": {
        "width": 780,
        "height": 320,
        "content": "### Example"
      }
    },
    {
      "id": "8ca604f7-214a-40fa-9d9a-4b93a2643d09",
      "name": "Binance - Get Fees",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        -440
      ]
    },
    {
      "id": "4ca9b631-24e3-4235-b2d2-ccfde43c6e72",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -140,
        -440
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create Statement",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto": {
      "main": [
        [
          {
            "node": "Binance - Get Fees",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto2": {
      "main": [
        [
          {
            "node": "Get Positions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto3": {
      "main": [
        [
          {
            "node": "Get Fees2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Fees2": {
      "main": [
        [
          {
            "node": "Aggregate Fees",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Price": {
      "main": [
        [
          {
            "node": "Update Token Prices1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Tokens": {
      "main": [
        [
          {
            "node": "Aggregate Tokens",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Tokens1": {
      "main": [
        [
          {
            "node": "Get Price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Token": {
      "main": [
        [
          {
            "node": "Create Statement1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Crypto2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields4": {
      "main": [
        [
          {
            "node": "Crypto3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Positions": {
      "main": [
        [
          {
            "node": "Aggregate Positions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Crypto",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Fees": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Tokens": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Get Tokens1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Positions": {
      "main": [
        [
          {
            "node": "Get Tokens",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}