The task looks pretty easy. As a simplest naive solution you can try to extend this example:
function copy_rows_from_history() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
// get data from 'History1'
var s = ss.getSheetByName('History1');
var data = s.getRange(1,1,s.getLastRow(),8).getDisplayValues();
// get all XPR rows from the data
var XRP = data.filter(x => x[1] == 'XRPUSDT');
// add the XPR rows to the 'XPR' sheet
s = ss.getSheetByName('XRP');
var lastRow = s.getRange('A1:A').getValues().filter(String).length;
s.getRange(lastRow+1,1,XRP.length,XRP[0].length).setValues(XRP);
// get all SHIB rows from the data
var SHIB = data.filter(x => x[1] == 'SHIBUSDT');
// add the SHIB rows to the 'SHIB' sheet
s = ss.getSheetByName('SHIB');
var lastRow = s.getRange('A1:A').getValues().filter(String).length;
s.getRange(lastRow+1,1,SHIB.length,SHIB[0].length).setValues(SHIB);
// etc...
}
Of course it would be more efficient to replace these 'XPR', 'SHIB', etc. with some array (dynamically created from the values of 2nd column of the 'History1' sheet) and loop trough this array with a couple universal functions. Etc. But I'm not sure if you ready to dive so deep in JS coding? Sometimes the simper the better.
Full-fledged variant of the script is here:
function copy_rows_from_history() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
// make the object with short and full names all the markets
const MARKETS = {};
[
['ADAUSDT' , 'ADA' ], ['BNBUSDT' , 'BNB' ], ['BTCUSDT' , 'BTC' ], ['BTTUSDT' , 'BTT' ],
['CELRUSDT' , 'CELR' ], ['DENTUSDT' , 'DENT' ], ['DOGEUSDT' , 'DOGE' ], ['EOSUSDT' , 'EOS' ],
['ETHUSDT' , 'ETH' ], ['FTMUSDT' , 'FTM' ], ['LUNAUSDT' , 'LUNA' ], ['MATICUSDT', 'MATIC'],
['NEOUSDT' , 'NEO' ], ['ONGUSDT' , 'ONG' ], ['QTUMUSDT' , 'QTUM' ], ['SHIBUSDT' , 'SHIB' ],
['STRAXUSDT', 'STRAX'], ['SUNUSDT' , 'SUN' ], ['SUSHIUSDT', 'SUSHI'], ['SXPUSDT' , 'SXP' ],
['TLMUSDT' , 'TLM' ], ['TRXUSDT' , 'TRX' ], ['XEMUSDT' , 'XEM' ], ['XRPUSDT' , 'XRP' ],
];
.forEach(m => MARKETS[m[0]] = {name: m[0], shortname: m[1]});
const s = ss.getSheetByName('History1');
// get all data from 'History1'
const data = s.getRange(1,1,s.getLastRow(),8).getDisplayValues();
// get list of markets from column 2 (only unique values)
const markets = s.getRange(2,2,s.getLastRow(),1).getValues()
.flat().filter(String).filter((item,i,ar)=>ar.indexOf(item)==i);
// fill all sheets with data
markets.forEach(m => fill_sheet(MARKETS[m], data));
// test:
// console.log(markets[0]); // show first market
// fill_sheet(MARKETS[markets[0]], data); // fill first sheet
}
function fill_sheet(market, data) {
const ss = SpreadsheetApp.getActiveSpreadsheet();
// get from data only the rows of given market
var data = data.filter(x => x[1] == market.name);
// go to sheet and add the rows
const s = ss.getSheetByName(market.shortname);
const lastRow = s.getRange('A1:A').getValues().filter(String).length;
s.getRange(lastRow+1,1,data.length,data[0].length).setValues(data);
}
Before

After
